GUI option to fix CIFS/Windows dataset Permissions/Samba 4 SNAFU (9.2.1.6)

Status
Not open for further replies.

esamett

Patron
Joined
May 28, 2011
Messages
345
I am struggling with getting my file permissions back in order. While I am glad that the developers are continuing to improve FreeNAS there are enough of us out there who would benefit from a GUI utility or protocol in the manual that would allow us to recursively reset dataset permissions for Windows ACL users. I have been diving the forums and experimenting but have not found a solution to manually do this.

Thanks,

evan
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Yes, a permissions guide is in the works. But I'm guessing for quite a few people it won't be the least bit helpful because I think it's going to be over most people's heads. Nonetheless I'm trying to dumb it down to the maximum extent possible while still keeping it useful. Just be patient.
 

esamett

Patron
Joined
May 28, 2011
Messages
345
Thanks cyberjock:

The most important thing for us NOOBS in a guide is a "tire jack and spare" for us to type when we get things screwed up, like we have with this CIFS/Samba3/Samba4.

Is there a command I can enter that will restore all permissions for Windows? Anything that I can use to restore sanity to my dataset is appreciated. I am also confused as to what flags/permissions need to be set/fixed.

Thanks dlavigne:

I read those sections and typed winacl in the shell:

Shell

[root@freenas ~]# winacl
Usage: winacl [OPTIONS] ...
Where option is:
-a <add|update|remove|reset> # action to perform
-o <owner permission> # owner ACL entry
-g <group permission> # group ACL entry
-e <everyone permission> # everyone ACL entry
-O <owner> # change owner
-G <group> # change group
-p <path> # path to set
-i <index> # Index
-f # only set files
-d # only set directories
-r # recursive
-v # verbose
-x # remove DOSATTRIB EA
[root@freenas ~]#​
I don't quite understand what the syntax represents and Google/Forums is sparse on the topic. I posted my failed experiments on another thread:


winacl -a reset -rp /mnt/tank
trying to reset everything recursively in tank
result: able to change some permissions and copy some files and folders, but not all: "you will need to provide administrative permission..."

winacl - add -rp /mnt/tank
not sure what "add" command is
result: same

[root@freenas ~]# winacl -a add -rp /mnt/windowsbackup/backup-password
winacl: invalid action


[root@freenas ~]# winacl -a update -rp /mntwindowsbackup/backup-password
[root@freenas ~]#
result: same problem

[root@freenas ~]# winacl -a reset -rxp /mnt/windowsbackup/backup-password
[root@freenas ~]#
result: same problem


[root@freenas ~]#
[root@freenas ~]# rsync -a /mnt/windowsbackup/backup-password/ /mnt/test2/datase
t2
result:
No files transferred, just the directory structure. Folders still "read only." Windows does not allow me to change permission to delete. Unable to delete dataset from FreeNAS GUI for several minutes "Busy" error. Finally worked.

Shell
es/Spain 2011/.Spain 2011 990.jpg.myZKTl" failed: Operation not permitted (1)
rsync: mkstemp "/mnt/test2/dataset2/backup2/jack dell 610/My Documents/My Pictur
es/Spain 2011/.Spain 2011 991.jpg.WUoYEA" failed: Operation not permitted (1)
rsync: mkstemp "/mnt/test2/dataset2/backup2/jack dell 610/My Documents/My Pictur
es/Spain 2011/.Spain 2011 992.jpg.1yOfMy" failed: Operation not permitted (1)
rsync: mkstemp "/mnt/test2/dataset2/backup2/jack dell 610/My Documents/My Pictur
es/Spain 2011/.Spain 2011 993.jpg.2u5ik8" failed: Operation not permitted (1)
rsync: mkstemp "/mnt/test2/dataset2/backup2/jack dell 610/My Documents/My Pictur
es/Spain 2011/.Spain 2011 994.jpg.TFbejz" failed: Operation not permitted (1)
rsync: mkstemp "/mnt/test2/dataset2/backup2/jack dell 610/My Documents/My Pictur
es/Spain 2011/.Spain 2011 995.jpg.FeillE" failed: Operation not permitted (1)
rsync: mkstemp "/mnt/test2/dataset2/backup2/jack dell 610/My Documents/My Pictur
es/Spain 2011/.Spain 2011 996.jpg.X96kf0" failed: Operation not permitted (1)
rsync: mkstemp "/mnt/test2/dataset2/backup2/jack dell 610/My Documents/My Pictur
es/Spain 2011/.Spain 2011 997.jpg.Pj2wt2" failed: Operation not permitted (1)
rsync: mkstemp "/mnt/test2/dataset2/backup2/jack dell 610/My Documents/My Pictur
es/Spain 2011/.Spain 2011 998.jpg.7bIkqJ" failed: Operation not permitted (1)
rsync: mkstemp "/mnt/test2/dataset2/backup2/jack dell 610/My Documents/My Pictur
es/Spain 2011/.Spain 2011 999.jpg.tylgQt" failed: Operation not permitted (1)
rsync: mkstemp "/mnt/test2/dataset2/backup2/jack dell 610/My Documents/My Pictur
es/Spain 2011/.Thumbs.db.NMExe4" failed: Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 2
3) at main.c(1053) [sender=3.0.9]
[root@freenas ~]#

[root@freenas ~]# rsync -rtl /mnt/windowsbackup/backup-password/backup2/ /mnt/te
st2/dataset2a/backup2/
[root@freenas ~]#
result: files transfer over but I am unable to change permissions on new dataset

[root@freenas ~]# cp -RL /mnt/windowsbackup/backup-password/backup2/ /mnt/test2/
dataset2a/backup2/
[root@freenas ~]#
result: files transfer but unable to to change permissions on new dataset

Any advice would be appreciated. For my situation it doesn't matter if I fix permissions in existing dataset or as the result of moving data to new volume/dataset.

evan
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
esamett:

Please stick to one thread. If you continue posting in multiple threads it not only confuses future readers but I can't even guarantee I'll read all of the posts.
 

esamett

Patron
Joined
May 28, 2011
Messages
345
I am very sorry. I will stick to this one.

Clarification on my volumes and ownership. They were set up differently over several years time depending upon the guide I was following: one for video storage, one for backups and a new one for this recovery project. I am not sure if it matters but I don't want to randomly change ownership and make them worse:

I haven't tried to fix this volume:
mnt/video
user: backupguy
group: backupuser
permission type: windows/mac acl

mnt/video/video-server
user: root
group: wheel
permission type: unix 777​

This is the volume I tried to fix permissions on a subdirectory:
mnt/windowsbackup
user: root
group: wheel
permission type: unix777

I had backups on a subdirectory (not dataset or vdev) that windows accesses via CIFS share:
mnt/windowsbackup/backup-password

After failing (see above) with winacl on vdev/windowsbackup/backup-user I tried to rsync or copy to a new volume. I tried this with both unix 777 and windows/mac acl:
mnt/test2
with dataset:
mnt/test2/dataset2
user: nobody
group: nogroup



Thanks again.
 
Status
Not open for further replies.
Top