LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File and folder permissions (https://www.linuxquestions.org/questions/linux-newbie-8/file-and-folder-permissions-337994/)

steve007 06-28-2005 08:31 AM

File and folder permissions
 
I want to be able to allow all users (in the users group) to see the contents of the main directory but not delete anything or add anything. I need all users in the ICT group to view and edit all the contents in the Main dir – ICT folder, all users in the marketing group to see and edit the contents of the marketing folder. All users in the ICT group to view the contents of the management folder but not edit them but all the users in the management group to be able to view and edit the contents. All users in the administration group to edit and view contents in the administration folder, but not able to delete the ICT folder, ICT users can view data in administration folder but can edit the contents in the Main dir- administration – ICT folder.

I think I have covered every possible scenario I’m after for this. I apologise if it sounds a bit confusing the way I’ve typed it, if you need further information please ask. I am fairly comfortable with typing command lines in terminal window or using the GUI for anyone who replies in either of these methods.

Also while I’m here – I have my fedora core system as a PDC and I have joined a few clients to the domain, if I log in as anyone (even root) on a client machine, I cannot seem to edit the permissions on the folders shared on linux from the client machine (win xp and 2000) why is this? Even though I could be logged in as root on the client machine, I still cant edit the permissions? I was trying to edit the permissions in a way that I am used to – since I am new to doing it all through linux.

Thank you very much for any help you can provide me.

Steve

tkedwards 06-28-2005 07:32 PM

Are you talking about files and folders shared by samba? or just the Unix file system permissions?

steve007 06-30-2005 03:19 AM

I am sharing files with Samba, But I thought you also have to make the permissions on that actual folders in the Unix system? I know how to add users for accessing folders in samba, but you can't add groups as far as I can tell...
If both ways could be explained it would be extreemly helpful so I can do both of them.

Thank you.

tkedwards 06-30-2005 03:48 AM

For the unix permissions create a group for each share. Then change the group ownership on the shared directory. Eg say we have a share called 'administration' then:
Code:

groupadd clerical
chown -R clerical:clerical /srv/clerical
chmod -R g+rwx /srv/clerical
chmod g+t /srv/clerical #sets group ID bit on clerical directory which has the effect of making all files created in that directory as having the same group permissions as the directory

Now in smb.conf have something like this:

Code:

[clerical]
        valid users = @clerical
        read only = no
        path = "/srv/clerical"

You may need to setup the clerical group as a samba group too.


All times are GMT -5. The time now is 04:31 PM.