Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
No! It will not be applied on newly created file/dir. But to achive this, let's go little deeper
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:
grep "umask" ~/.profile
If it gives some output (Note: umask is generally set to 022), and if umask is already set to 022, then open the .profile file for editing, remove "#" written against umask entry and also change it's value to 022 if needed. Then any newly created file will get 755 permission by default, which means no write permission to group or others.
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:
chmod -R g+xs /path/to/dir
---- To summerize all posts, you've to do following -----
1. Change permissions of already existing files/dir/subdirectories to 755:
chmod -R 755 /path/to/dir
2. Add yourself as owner of all files/dir/subdirectories:
chown -R username /path/to/dir
3. Set SGID on all dir/subdirectories:
chmod -R g+xs /path/to/dir
4. Change umask value to 022 (if not already set to 022) and uncomment umask entry from .profile.
And you're done! Test it once and let's know if still you've any problem.
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.
Before giving any recommendations about file-permissions the real question is: How does your family connect to the shared drive, is it an USB device, a network share, ...?
Most likely this is not a file-permissions thing, but a "How do I setup the sharing service correctly?" problem.
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.
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.