LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Clarification of Linux File Permissions (https://www.linuxquestions.org/questions/linux-newbie-8/clarification-of-linux-file-permissions-381096/)

AlistairH 11-08-2005 09:20 AM

Clarification of Linux File Permissions
 
Hi folks, this newbie's first question (though no doubt not my last)

I've been trying to get Samba to work correctly in Fedora Core 4 but having great problems writing anything across the network.

The past two hours have seen me go back to basics and look at the Linux file permissions. I confess I cannot see how they work. More specifically how a sub-folder/file inherits its permissions when it is created.

For example:

Logged on as root I create a folder called 'datafiles' with the owner as 'root' and the group as 'bms' (a group containing the users, 'alistair' and 'louise'). The permissions are set to rwxrwx---.

If I log on as 'alistair' (a member of the 'bms' group) I expect the permission to remain the same except for the ownership being in my name - which is does. However, the group changes to the primary group of 'alistair', namely 'users' in my case. The permissions also change to rwxr-xr-x. Why?

Thinking that the 'Sticky' flag may solve the problem, I repeated the process. This had no effect - the permissions remain the same as described in the preceeding paragraph.

Turning the 'Group ID' flag on results in ensures that the group setting stays the same as previously, i.e. 'bms' which is what I want, but the access permissions change to rwxr-xr-x and not the rwxrwx--- of the parent folder. How can I stop this happening?

Clearly, I can log into the console as Ive done with this exercise and change the permissions as desired, but users won't be able to do that. Indeed, they'll be creating folders and files via their Windows pcs so they can't change them even if the know how. All sub-folder and file access permissions must be governed by the parent folder that I set up for them.

Now whether or not this is the cause of my access problems via Samba as described above I don't know. However, I need to get this sorted before I can investigate any issues with network access. I've found lots of references on the web regarding Linux file permission but none that explain to me how the inheritence works.

Cheers (with apologies for rambling on so much)

Emerson 11-08-2005 01:37 PM

This is not what you think. Things are a little more complicated, or maybe simplier... depending how you look at it :)
I'd recommend searching Google for something like this.
And one may always read Samba manual. :study: Can't say I know someone who has studied all of Samba documentation though. :rolleyes:

LinuxSeeker 11-08-2005 04:03 PM

Check this out. It is for SuSE, however, you should be able to find ways to skip the steps that involve Yast.


All times are GMT -5. The time now is 02:51 AM.