Help with Freenas (ZFS) permissions

w1z4rd

Karmic Sangoma
Joined
Jan 17, 2005
Messages
52,146
Reaction score
8,340
Location
127.0.0.1
The setup:

I have two boxes next to each other. One is a linux centos file server. The other is a freenas file server. The linux file server is meant to backup to the freenas file server.

I have created a file share on the freenas device. The linux box is meant to run a daily cron job to mount the file share, rdiff the data and then unmount the file share. I thought it was a pretty simple concept... I guess I was wrong.

This is the bash script I am running:

Code:
mount -t cifs //10.0.0.4/backup -o username=USERNAME,password=PASSWORD /mnt/nas

/usr/bin/rdiff-backup / /mnt/nas/backup/

umount /mnt/nas

Now my problem is I can mount the share. I can create a directory. I can create or copy a file... but I cant delete a file! I get Permission denied.

Code:
[root@server nas]# mkdir test2
[root@server nas]# cd test2
[root@server test2]# touch test.file
[root@server test2]# ls
test.file
[root@server test2]# rm test.file 
rm: remove regular empty file `test.file'? y
rm: cannot remove `test.file': Permission denied
[root@server test2]#

I have no clue whats going on here:/ Ive never had it where I can make a file but not delete it.

Perhaps there is something wrong with my configuration? Ive even tried adding the user to the wheel group and that doesnt help

This is my configuration for the user: http://i.imgur.com/OIBq8DI.png
This is my configuration for the file share: http://i.imgur.com/lRYXbcu.png
This is my configuration for the storage permissions: http://i.imgur.com/Jktvex2.png

Im not sure why else to do. Any useful advice is welcome.
 
Using CIFS on ZFS, means you need to set Windows based permissions on the folders/files.

So using your example of USERNAME, that user needs access to delete files/folders.

Now this may or may not work on FreeBSD, but it works on OpenIndiana.

This is an example, not sure if it will work, but it has to be done on the freenas device:

Code:
chmod -R A=\
owner@:full_set:fd:allow,\           
group@:rwxpdDaARWcCos:fd-----:allow,\
everyone@:rwxpdDaARWcCos:fd-----:deny \
/mnt/borg

Look up on Windows based permissions on ZFS. The above assume the user you log in via CIFS is the owner of that mount on the server side.

Oh the owner@ could also be changed to USERNAME@ I believe. ZFS has taken permissions to the same level that Windows can do them.
 
Top
Sign up to the MyBroadband newsletter
X