I have a directory in which collaborative files / directories are stored. Say directory abc is owned by root and the group is project-abc.
I've created an NFS share on my ubuntu 12.04 machine and am now trying to properly set up permissions on it.
To enforce the following permissions on files in /var/www, can I use the commands chmod u+s and chmod g+s? Do I just run it on the /var/www directory (once the permissions are properly set)?
Permissions:
chown -R root:web /var/www
chmod -R g+rw /var/www
I've read a little about chmod and have a high-level understanding of file permissions. But I'm a little confused about the concept of an 'owner'.
If my user account is the 'Owner' of a directory but it has no permissions (chmod 0000) does my user have any more ability to do anything than another random user on the system? Assuming neither user is a super user?
I use for example to change everyone's permissions:
chmod 777 file
Now, what if I want to preserve the current permissions?
I know there's something like
chmod xx7 file
in case I'd only want to change the world permissions, but I can't work it out (forgot).
Thanks!
Is there a way to change who can chmod (change the permissions of) a particular file?
It is only the owner of the file (without sudo-ing it), if my experimentation has been correct?
But what I want to do is allow on the group to be able to edit the file permissions, and not the owner.
This isn't possible under the traditional Unix file system I don't think, but I'm wondering if there is a sneak
When I use rsync to backup something to an usb stick (formatted with an ext4 filesystem), rsync seems to preserve only the owner and group of the files but changes everything for directories to root and changes all permissions for directorys to drwx------ (permissions of files are preserved).
The exact command I used was:
sudo rsync -a /home/myuser/mydir/ /media/usb/backup/
Why are the director
I encounter a strange problem on a unix/linux machine:
I'm member of a group, let's call it group A and a certain file (which has a different owner) belongs to group A as well. The permissions of that file are
-rw-rw----
so I'd expect I should be able to open that file, but I am not: I'll get the "Permission denied" error message when I try to look at the file's content (using cat).
Why are Linux file permissions still so primitive and is this likely to ever change?
Each file/dir can only have an owner and group.