[Q] Permission free directory? how?
I have looked around and played with chown, chmod, & setfacl to not avail.
Currently I use an ntfs drive as a shared drive with my family. Every one can read, write, axecutr, and delete anything on it. But I really want to do that now on a linux drive as well. I want all users to have all permissions to do everything. With setfacl I got everything except delete a few times but nothing was permanant. Help please! |
|
All this can be done using a few commands:
1. Give yourself (let your username is user1) ownership of the shared directory: Code:
chown user1 /path/to/dir Code:
groupadd family Code:
chmod 755 /path/to/dir |
non protected directories
Will these permissions be inheritable on subdirectories?
Something like a windows samba share with "allow users to change files" checked. |
In that case, invoke chown and chmod recursively by just adding -R option, as:
Code:
chown -R user1 /path/to/dir |
Quote:
|
Quote:
Any newly creaeted file/dir gets it permission assigned on basis of umask value defined in your .profile file. If umask entry is commented in .profile (i.e a # written against it) file, then it considers umask values defined under /etc/profile. So to check it, invoke: Code:
grep "umask" ~/.profile Second (perhaps I forgot to mention in previous post), add SGID on shared drive directory, so any newly created file/dir inside it will get same group as that of parant dir. has, using: Code:
chmod -R g+xs /path/to/dir 1. Change permissions of already existing files/dir/subdirectories to 755: Code:
chmod -R 755 /path/to/dir Code:
chown -R username /path/to/dir Code:
chmod -R g+xs /path/to/dir And you're done! Test it once and let's know if still you've any problem. |
Quote:
Most likely this is not a file-permissions thing, but a "How do I setup the sharing service correctly?" problem. |
File Permission on Shared directories
First, thank you everyone.
Second, It is a shared external drive. We have a shared NAS but for larger files we use an external USB hard drive. Normally I have the formatted as NTFS and so anyone can read, write, execute, etc... But I would like to have a partition formatted as ext4 and also I have run into this before where I write a file to an ext3/4 partition and now my kids can not access it. Also, on a shared laptop I want a data partition that no matter who logs in to the machine, they can read/write/execute anything on the data drive. Again, currently I solve this by leaving the data drive as ntfs but sometimes I WANT permissions on certain directories and none on others. This can only be done in linux if I can be able top create real shared directories that anyone can do anything in this directories without resorting to ntfs partitions. |
Are all your machines Linux machines? Windows machines will not be able to read ext4 formatted drives.
|
Yes all running pclos 2012
|
In that case the disk should do what you want by default, except that a user can't delete or write to the files a different user has created. Unless all users have the same UID or are member of a group that is present with the same GID on all systems and the group has rwx rights on the files/directories.
I don't know how PCLOS handles the default groups of users, but usually they all should have the same GID on all machines. Example: On a Debian system the first created user will have the UID 1000, regardless of its username (and if not specified differently by the admin). So if you have two Debian machines the first user on any of those machines can access the files of the first user on the other system, because both have the same UID. This works similar with groups, of course only if the group has the rights to access the files. So if all your family members have their own machines with only their user account on it (besides root) it should work out of the box. |
All times are GMT -5. The time now is 03:56 AM. |