Permissions

Status
Not open for further replies.
Joined
Sep 9, 2013
Messages
29
On my freenas box permissions are set to this

drwxrwxrwx 281 root wheel 283 May 16 10:51 movies
drwxrwxrwx 120 root wheel 124 May 13 07:57 music
drwxrwxrwx 45 root wheel 47 May 16 10:56 tv_shows

On ubuntu the permissions are set to this (I have the drives mounted through fstab)
drwxrwxrwx 282 root root 0 May 16 11:03 movies
drwxrwxrwx 120 ritzie root 0 May 13 07:57 music
drwxrwxrwx 45 ritzie root 0 May 16 10:56 tv_shows

I'm unable to change the owner of movies. When I created the dir on ubuntu the owner and group are set to ritzie:ritzie however when I mount the drive it changes to root:root. I need to change root:root to ritzie:root. How can I do this?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Read the man page for mount. I think you want the uid and gid flag.
 
Joined
Sep 9, 2013
Messages
29
My fstab reads as follows (on ubuntu)
//xxx.xxx.xxx.xxx/movies /home/ritzie/movies cifs guest,uid-1000,iocharset=utf8
//xxx.xxx.xxx/music /home/ritzie/music cifs guest,uid=1000,iocharset=utf8
//xxx.xxx.xxx/tv_shows /home/ritzie/tv_shows cifs guest,uid=1000,iocharset=utf8

music and tv_shows are fine but not movies.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I have no clue what the 'guest' flag does but I'm assuming that with cifs it forces the mount to happen as guest or 'other' and that is probably why your permissions are broken. What are the permission on the dataset you are sharing? The reason 'movies' show up as root:root is because the folder or dataset you are sharing has those permissions.

I suggest using an authenticated mount like below or giving 'other' read/write/execute permissions on your directories.

//freenas.lan/movies /home/ritzie/movies cifs credentials=/root/.smbcredentials,iocharset=utf8,uid=1000,gid=1000 0 0
 
Joined
Sep 9, 2013
Messages
29
The permissions are the same on each one. I'll try what you suggested.
Screen Shot 2015-05-16 at 9.33.01 PM.png Screen Shot 2015-05-16 at 9.33.42 PM.png
 
Status
Not open for further replies.
Top