Help - Search - Members - Calendar
Full Version: File Permissions
Linuxhelp > Support > Technical Support
On my linux server in my office, i have a folder that is shared with samba containing all of the files that three of the employees use together. The problem is that the first person that uses one of the files becomes the owner, and the rest do not get write access. I am using Red Hat 9 and wanted to know if there was a way I could do this faster without going into every file and changing the permissions. The folder is already set with permissions for everyone, just not the files contained inside.

Thanks for your help,
Create a group and put those 3 users in the group and then change the group ownership on the file to the group.

For example,

To create a group called 3guys run:

groupadd 3guys

Then in /etc/group you will see something like this:


Change this to


Then run:

chown root.3guys /path/to/file

and then:

chmod 664 /path/to/file

There is another solution which you may want to consider. Samba has the ability to force read/writes as a single user or group. In the smb.conf file (use "find . -name 'smb.conf' from a terminal window to find it) you can use the following lines:

force user = username


force group = groupname

Replace username and groupname with suitable values. Be sure to put these tage in the [share section] that you are using. The 'force group' option would work well with Joey's suggestion. Be sure to restart samba when you are done.

-J. Random
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.