How to protect folders from deletion?

Status
Not open for further replies.

SuperMiguel

Cadet
Joined
Jan 29, 2015
Messages
8
Q1) So i just installed FreeNAS and created a Windows share and added the guest user since i wanted everyone to be able to use the NAS without login/password and i created multiple folders... Now i want to protect those folders from deletion.. I dont care if whats inside the folder gets deleted but i dont want the folders them self to be deleted... How would i do this?

Basically:

1) Users cannot create new folders or files on the root.

2) Users cannot delete or move folders or files from the root.

2) Once inside a folder, the users need full control over all the contents.

Q2) Also is there a way that when i browse my FreeNAS computer name it will go directly to my share without having to click on it? Like i Created a Share named Miguel, and inside it are 3 folders... Then when i go to \\freenas i only get the miguel folder i have to double click to get to my 3 golders.. is there a way to make that when i type \\freenas i get all 3 folders directly? Thanks
 
Last edited:

Tywin

Contributor
Joined
Sep 19, 2014
Messages
163
Q2) Also is there a way that when i browse my FreeNAS computer name it will go directly to my share without having to click on it? Like i Created a Share named Miguel, and inside it are 3 folders... Then when i go to \\freenas i only get the miguel folder i have to double click to get to my 3 golders.. is there a way to make that when i type \\freenas i get all 3 folders directly? Thanks

You could browse to \\freenas\miguel
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Q1) So i just installed FreeNAS and created a Windows share and added the guest user since i wanted everyone to be able to use the NAS without login/password and i created multiple folders... Now i want to protect those folders from deletion.. I dont care if whats inside the folder gets deleted but i dont want the folders them self to be deleted... How would i do this?

Basically:

1) Users cannot create new folders or files on the root.

2) Users cannot delete or move folders or files from the root.

2) Once inside a folder, the users need full control over all the contents.

Q2) Also is there a way that when i browse my FreeNAS computer name it will go directly to my share without having to click on it? Like i Created a Share named Miguel, and inside it are 3 folders... Then when i go to \\freenas i only get the miguel folder i have to double click to get to my 3 golders.. is there a way to make that when i type \\freenas i get all 3 folders directly? Thanks
The proper response to (1) to (3) is to create user accounts / passwords, and appropriately set permissions.
A couple of other options are

(a) Have your 3 folders owned by a different admin user. Use explorer to modify ACLs for your 3 folders so that "everyone" has read for the share itself "this folder only". Then create a separate ACE on the 3 folders for your guest user account granting "full control" of subfolders only. This should work because everyone is authenticating as the same user (guest access). The only caveat is that the zfsacl vfs module acts up when using guest access and you may not be able to modify ACLs.

(b) Or if you like living on the wild side, you can use chflags. With the caveat, you break it, you get to keep the pieces.

I have attached a screenshot of an example of how to configure (a) where "training" is the equivalent of your guest account.
Capture.JPG
 
Last edited:
Status
Not open for further replies.
Top