Chmod operation not permitted?

Catfish asked:

I’m trying to deploy a rails app and i’ve done it before, but this time i’m having a weird issue.

Why can i not run this chmod command? I’m currently logged in as user: csmsched

-bash-3.2$ pwd
/var/www/vhosts/mysite.com/staging
-bash-3.2$ ls -al
total 40
drwxrwxrwx  6 csmsched psaserv 4096 Mar 18 16:05 .
drwxr-xr-x 14 root     root    4096 Mar 18 15:37 ..
drwxrwxrwx  2 csmsched psacln  4096 Mar 18 10:52 css
-rwxrwxrwx  1 csmsched psacln  1150 Mar 18 10:52 favicon.ico
drwxrwxrwx  6 csmsched psacln  4096 Mar 18 10:52 img
-rwxrwxrwx  1 csmsched psacln  8997 Mar 18 10:52 index.html
drwxrwxrwx  2 csmsched psacln  4096 Mar 18 10:52 mt_images
drwxrwxrwx 11 csmsched psacln  4096 Mar 18 10:52 test
-bash-3.2$ chmod g+w /var/www/mysite.com/staging/
chmod: changing permissions of `/var/www/mysite.com/staging/': Operation not permitted
-bash-3.2$ 

My answer:


You mistyped the directory name.

Instead of /var/www/vhosts/mysite.com/staging your chmod command contains /var/www/mysite.com/staging.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.