CIFS, Multiple Users, Permissions

Status
Not open for further replies.

CodeMonkey

Cadet
Joined
Mar 21, 2015
Messages
6
First, I know this is a newbie question, and, I've searched some, seen some answers, but none seem to work.

What I'm trying to do is set up shares for my family at home. I want MOST of my shares to be writable by everyone. But, I wouldn't mind having a few "owned" shares too. But, first things first.

I can't seem to get the permissions right.

I'm staring from a large amount of data that I have backed up, and, I'm trying to load that data into the shares. But, with only one user, I'm getting permission errors for everything but using rsync to restore.

So, my problems, in order of priority:

1) When using cygwin to copy files from /cygdrive/e/backup to cygdrive/m/freenas, permissions aren't right. (I'm using rsync -rv to do the copy. I'm not using -a or -p since I don't want to try to force incorrect permissions) I *can* rsync the files directly to the server (after enabling the service)

2) How do I get multiple users to be able to read/write from shared directories. (And, guests to be able to read)?

Thanks in advance,


-Dave
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
make all users part of the same group and make the permission 774. Then make the group owner of all the files match the group that you just added all the users to. With these permissions the owner and group are going to have full permissions then all other people accessing the files will only have read access because of the 4 in the permission set above.
 

CodeMonkey

Cadet
Joined
Mar 21, 2015
Messages
6
How do I force the group to stay the shared group? Meaning, how do I force all new files to be in the "home" group?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
The group gets inherited from the parent directories group. So make the parent directories group owner the group "home".
 

CodeMonkey

Cadet
Joined
Mar 21, 2015
Messages
6
So, while the permissions look right:
Code:
[codemonkey@sheldon /mnt/zdev-raid5/Media]$ ls -ltra
total 1360
drwxrwxr-x+    5 codemonkey  wheel        6 Mar 20 20:31 ..
drwxrwxr-x+    8 root        Home         8 Mar 20 21:01 TV Shows
drwxrwxr-x+    3 root        Home         3 Mar 20 21:17 Guitar
drwxrwxr-x+    4 root        Home         4 Mar 20 21:24 Books
drwxrwxr-x+    3 root        Home         3 Mar 20 21:26 Unsorted
drwxrwxr-x+ 2138 root        Home      2140 Mar 21 19:05 Tunes
-rwxrwxr-x+    1 root        Home     41382 Mar 21 19:05 Tunes.dsk.txt
-rwxrwxr-x+    1 root        Home   3076848 Mar 21 19:05 Tunes.txt
-rwxrwxr-x+    1 root        Home         0 Mar 21 20:11 .windows
drwxrwxr-x+    2 codemonkey  Home         2 Mar 21 20:49 tmp
drwxrwxr-x+    8 root        Home        11 Mar 21 20:49 .


And, codemonkey is in the "Home" group, when I connect with windows, I can't write to the directory with cygwin or windows explorer. I am authenticating as the user codemonkey, from windows.

Thoughts? I've tried creating files in directories, and in the root of the share (Media)


 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You are using Windows dataset and I don't know how to fix that of the top of my head. You can right click in windows on the directory and modify the permissions there.
 

CodeMonkey

Cadet
Joined
Mar 21, 2015
Messages
6
Still no luck. Looks like, since I am using a local user on FreeNAS, it doesn't map permissions right when I map the drive under windows.

Can't seem to find any guide for doing that either . . . . anyone have any ideas?
 

CodeMonkey

Cadet
Joined
Mar 21, 2015
Messages
6
STrange -- this suddenly started working. Maybe the bug was with windows? Let's call it closed for now :)
 
Status
Not open for further replies.
Top