chmod operation not permitted on /var/www/ SSH raspbian
10,498
You need to use sudo
with chmod
as well:
sudo chmod go-rwx /var/www
Related videos on Youtube
![William](https://i.stack.imgur.com/8jCz2.png?s=256&g=1)
Author by
William
Updated on September 18, 2022Comments
-
William almost 2 years
I am trying to setup a simple Apache web server over SSH in Raspbian but cannot obtain access to
/var/www
. I have tried these commands to obtain write permission:sudo chown -R www-data:www-data /var/www chmod go-rwx /var/www
For
chmod
I got this error:chmod: changing permissions of ‘/var/www’: Operation not permitted
For
chown
it didn't display any message, and appeared to do nothing. To recap, I am trying to figure out how to obtain access to use these commands and also to obtain access to that directory. I am logged in on the default user pi and haven't set a root password. Thanks in advance.-
barlop over 8 yearswhat about sudo chmod.. And why does your example do sudo chown but not sudo chmod?
-