Mac OSX Snow Leopard and FreeNas File Permissions

Associate
Joined
26 Jun 2009
Posts
29
Hi,

I have recently set myself up a Freenas server all is going well. I am however having trouble moving files from my mac to the mounts I am using the CIFS/SMB service and I constantly get the message;

The operation can’t be completed because you don’t have permission to access some of the items.

I have used BatChmod to change all the permissions of the folder and sub-folders and files to Read & Write but still it will not let me move the folder. Also the folder I am trying to move is the Mail folder so I can back it up. I have googled around and found not much that works.

Anyone else ever had problems with this? Is there anyway I could get around it?

Thanks

(if you need any more info just ask)
 
Read/Write for owner/group or public though?

If you list the file (eg. ls -l) what permissions does it show?

I'm attempting to understand if it's the mac permissions or the FreeNas side that's causing issues. It could be still in use by a process on the mac.

I'm assuming you're moving (or copying) the file from the mac to NAS?

Some people have had success when they don't copy the extended attibutes of the file (resource forks). You can do this with the "X" option with the system 'cp' (copy) command.

You could try this at the terminal for a single file:
Code:
cp -X source destination

If you want to recursively copy the tree under a directory you also need to specify 'R' for recursive:
Code:
cp -X -R source destination

I don't know the impact of restoring a extended-attributes file back into email. The reason I say this is that extended attributes is a general scratch pad for storing information linked with a file or directory that's defined by the application itself.
 
Last edited:
I had the exactly same problem on my Fedora 12 Server running Samba, To fix this i googled and read up.

the fix was turning off Unix Extensions in Samba conf file.

im sure the command is Unix Extensions = no

since then i can copy files fine :)

heres a bug report
This is copied from forum post
http://forums.contribs.org/index.php?topic=40599.0

Samba 3.0.2x (we are using 3.0.28) has the 'unix extensions' option set to 'on'
by default. This allows Unix users who write to the Samba shares to set their
own permissions bits. Mac OS X up until now has never attempted to do this, but
from Leapard, any directory that gets created on a Samba share, get chmod'ed
through this Samba extension. That really screws up the i-bay files since users
must *not* change these permissions - the sticky bit is very important in order
for i-bays to work the way they do.

The workaround (and ultimately the permantent solution) is to set the following
in /etc/samba/smb.conf:

unix extensions = no

Restart samba, and the problem goes away.

To replicate:

- Create an i-bay share and add two users
- From OS X Leopard, and as one user, create a folder in that share
- Create a file within that folder.
- From a PC, and as the other user, try to create a file in that new folder
- Inspeact the privilege bits of the new folder from a shell prompt.

Result:

- The PC user will not be able to create a file. They will get a permissions
error instead.
- The new folder will not have the sticky bit set. The file created within that
folder will have group ownership of the first user, and not of the i-bay.
 
I had the exactly same problem on my Fedora 12 Server running Samba, To fix this i googled and read up.

the fix was turning off Unix Extensions in Samba conf file.

im sure the command is Unix Extensions = no

since then i can copy files fine :)

heres a bug report

I tried putting that into the smb.conf file and it was successful but when i restart the service it will disappear and I am back to square one again.

Here is the config file and where I put the Unix Extensions = no

[global]
encrypt passwords = yes
netbios name = freenas
workgroup = WORKGROUP
server string = FreeNAS Server
security = user
dns proxy = no
# Settings to enhance performance:
use sendfile = yes
strict locking = no
read raw = yes
write raw = yes
oplocks = yes
max xmit = 65535
deadtime = 15
getwd cache = yes
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=64240 SO_RCVBUF=64240
# End of performance section
unix charset = UTF-8
store dos attributes = yes
local master = yes
time server = yes
guest account = ftp
display charset = LOCALE
max log size = 10
syslog only = yes
syslog = 1
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
log level = 1
dos charset = CP437
smb passwd file = /var/etc/private/smbpasswd
private dir = /var/etc/private
passdb backend = smbpasswd
Unix Extensions = no

[Data1]
comment = Data1
path = /mnt/Data1/
writeable = yes
printable = no
veto files = /.snap/
hide dot files = yes
guest ok = no
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
#vfs objects = netatalk

[Data2]
comment = Data2
path = /mnt/Data2/
writeable = yes
printable = no
veto files = /.snap/
hide dot files = yes
guest ok = no
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
#vfs objects = netatalk
 
im sure you know this, but are using Super User so you can save the changes?

it seems weird that its changing. (btw you might need to dismount & remount the drives for this setting)
 
Interesting, I'll have to see if I can set this option on my QNAP NAS as I get the same error trying to write to it from time to time from my Mac Mini (seemingly at random .... it'll write some files find and others it won't write at all despite the ownerships and permissions being the same both for the files and the directories on the NAS)

Can get _really_ annoying if you're trying to do something ...
 
Sucess!! The disks do have to be unmounted and the service not enabled, fell very stupid now. So glad.

Thanks to everyone that helped.
 
no problem :) it was annoying for me to setting it up,

mine running perfectly now on a gigabit connection to my Mac Pro,(see my server in sig)

its great for backups :)
 
Back
Top Bottom