0

This seems simple but I can not figure it out. I have two user rob and erik both belong to a group called ivdev. ivdev is the group owner of /var/web/www. Neither user can create new files. If I give other permission to write then this will work but defeats the purpose of the group.

erik@web1:/var/web$ id -Gn erik
erik adm cdrom sudo dip plugdev lxd lpadmin sambashare ivdev

erik@web1:/var/web/www$ id -Gn rob 
rob sudo ssh ivdev

erik@web1:/var/web/www$ touch this
touch: cannot touch 'this': Permission denied

erik@web1:/var/web/www$ su rob
rob@web1:/var/web/www$ touch that
touch: cannot touch 'that': Permission denied

erik@web1:/var/web/www$ cd ..
erik@web1:/var/web$ ls -l
drw-rw-r-x 2 root ivdev 4096 Nov 21 17:22 www

Thanks

  • And what is the group permissions on www? – George Udosen Nov 22 '17 at 5:58
3

Since nobody has x permission, nobody except root can traverse the directory www to access any file inside... See "Accessing files in a directory without x-permission" on this board.

  • Making the permissions 775 did the trick. I guess that my understanding of the execute permission was wrong. I thought that a user just needed read/write to work on the files in a folder and an application or server would need execute permission to run the files (py, bash, php, etc). – Eman Nov 22 '17 at 23:27
  • @Eman: Permission x for files means that they are executable. Permission x for directories means that they are traversable (to get to the files inside). – AlexP Nov 23 '17 at 0:13

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.