chmod issues with samba and osx

Status
Not open for further replies.

copeland3300

Dabbler
Joined
Aug 4, 2014
Messages
13
Hi All,

I've setup a FreeNAS server for a friend of mine who is starting a video production company. I have it running a RAIDZ2 (4 x 4TB WD greens) for his daily backup and a RAID1 (2 x 1TB WD Blue) for his Time Machine.

He's using OSX 10.9

He's going to have some people working with him in the future probably using Windows machines, so I set up an AFP for his Time Machine and a CIFS for his data backup.

Things have been going pretty well for the last week or so, but yesterday he found that he was uploading video clips and they would turn gray in the Finder, with a date of sometime in 1984. He couldn't do much with these files and they couldn't be deleted as it said he didn't have permission.

Some of the files would stay black and he could edit these.

I checked the permissions on the files and they were all the same, and I checked the ACLs using getfacl * and they all appeared the same.

After doing some research I found that some people don't like the implementation of SMB on *nix, so I figured I would try making the share AFP for now. That seems to have worked. However, many, if not all of the files he's moved onto the server give me an error when I try to chmod them, even as root.

I thought it might be a time issue, so I set his machine and the NAS to use time.apple.com.

Additionally when I try to change the permissions on the ZFS Volume, I get the following error:

notifier: chmod: /mnt/zfsvolume/folder: Operation not permitted.

I get this for all of the files and folders in that volume.

I have that volume set to nobody, his group, read for all, white for owner and group and execute for all, with unix permission type, and I try to set it recursively.

I've seen someone mention that he detached the volume and then reimported it and that solved everything. I don't want to do that before I check that that's not going to dump all of the data on that volume.

Any help would be great. Sorry for the wall of text.

Thanks!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
That's because chmod is not appropriate for your files. You need to use setfacl and getfacl or do the permissions changes in Windows/Mac as appropriate.
 

copeland3300

Dabbler
Joined
Aug 4, 2014
Messages
13
My issue is that the result for getfacl was the same for both one of the grayed out files and one of the working ones. I'm also using unix perms, not Apple/Windows.

Would the ACLs still be the issue?

By the way, thanks for helping me with this, I appreciate it.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
If you are using unix perms when using apple and windows clients you are outside of our expected criteria. No clue how it would behave or how to fix it because if you are using windows and/or apple you should be using ACLs. Windows doesn't know how to handle unix permissions properly.
 

copeland3300

Dabbler
Joined
Aug 4, 2014
Messages
13
Hmmm, ok I'll correct the Volume to use win/osx perms.

Off hand do you know what I would run at the top of the directory structure to reset all of the permissions? I'm assuming something along the lines of setfacl -R, but I don't know the other switches to use.

Thanks.
 

copeland3300

Dabbler
Joined
Aug 4, 2014
Messages
13
I ultimately did the following to fix the issue:

I went to the top of the directory structure for my volume, in this case, /mnt/zfsvolume, and ran the following:

find ./ -exec setfacl -b {} \;

This cleared the acl settings that were there, and this seems to have cleared everything up.
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You mean to tell me that by removing all ACLs it cleared up the weird ones! Color me shocked!
 
Status
Not open for further replies.
Top