1

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$ 
  • Although your problem was solved, lsattr and chattr -i (as superuser) is another potential place to look ... -i is for immutable. – 0xC0000022L Mar 19 '13 at 0:22
2

You mistyped the directory name.

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.