LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Issue with Permissions (https://www.linuxquestions.org/questions/linux-server-73/issue-with-permissions-4175626670/)

1s440 03-30-2018 10:10 AM

Issue with Permissions
 
Deleted

pan64 03-31-2018 10:13 AM

so set the parent of that main folder to read only.

1s440 04-01-2018 05:04 AM

Quote:

Originally Posted by pan64 (Post 5837695)
so set the parent of that main folder to read only.

Hi ,

Thanks for your answer.Unfortunately if we set the parent of the main folder,the users accessing from samba share (windows) could not read write and modify the folder.

pan64 04-01-2018 05:14 AM

you need to give more info about: how are the permissions currently set on the directories mentioned, how the samba share configured and how it was mounted. (and other related info...)

1s440 04-01-2018 05:39 AM

Deleted

pan64 04-01-2018 09:38 AM

this is not nfs at all.
And as I told you you need to change the parent dir of the main dir (in your case it is probably /limit/smb-users). And you need to set it as read only. In that case noone will be able to remove anything from it, including the dir named share.

MadeInGermany 04-02-2018 10:52 AM

The users should not be able to delete the CIFS-shared folder /limit/smb-users/share by means of CIFS access.
Nevertheless you can add additional protection on its parent folder on the Samba server
Code:

chown root:root /limit/smb-users
chmod 755 /limit/smb-users

Also you can restrict deletions of the sub folders /limit/smb-users/share/* to their owners by means of a t bit
Code:

chmod 1777 /limit/smb-users/share

1s440 04-06-2018 02:27 AM

Thanks for the reply. If the shares are mounted through NFS and if we apply the stickybit on the main share does the linux permissions will overwrite?

MadeInGermany 04-06-2018 04:46 AM

Why do you delete your earlier posts?? This is a public forum. It offends every reader :(

The chown and chmod set Linux permissions on file level. It does not matter if this is on a local disk or a NFS-mounted NetApp disk.
In addition there can be CIFS share permissions defined in smb.conf.
If conflicting, in most cases the most restrictive permission wins.

1s440 04-06-2018 06:26 AM

But there is no CIFS share permissions defined in smb.conf so I would like to apply the permissions from linux. So i just wanted to be sure

MadeInGermany 04-06-2018 06:49 AM

Sorry I have forgotten your problem description that was in your initial post, and is deleted now.
I thought your problem was about Samba.

1s440 04-06-2018 06:57 AM

the issue which was posted was applied with rightpermissions same as you suggested.

But we have few more servers and shares where the shares are mounted through Netapp and not have CIFS share. so what if we apply the same permissions on linux server, will it be any problem?

MadeInGermany 04-06-2018 08:59 AM

If
df /limit/smb-users
shows that it is NFS from NetApp, then you can still run the chmod and chown commands.
At least for the latter you must have root rights on the NFS share, i.e. a root= clause in the NetApp's exports that lists the IP or hostname or a netgroup (that has a list of IPs or hostnames) with the NFS-root rights.
Once the permission change on the file system is done, any other servers that mount the same will get the change.

1s440 04-09-2018 02:27 AM

Thanks for the reply. I found it

1s440 05-11-2018 10:20 AM

Resolved


All times are GMT -5. The time now is 08:56 AM.