I'm running the latest version of Ubuntu, and have mounted a SMB share via a line in rc.local.

The share mounts correctly, and I can browse files freely, create new files, and then delete them without problems.

But when I try and rsync a directory onto the mounted share:

rsync -a --delete /MySource/ /SharedMountPoint/

I get lots of errors:

rsync: failed to set times on "/SharedMountPoint/SomeDir": Operation not permitted (1)

and similar errors about being unable to create temp files.

All the files and directories on the share are listed with numeric uid/guid - which I suppose is reasonable, as they were originally created via a sync from a windows box.

I have no great need for access control - its just a box on a LAN that me and my family use as a dropbox - I'd basically just like anyone to be able to access it (provided they've done basic authentication).


When mounting, use -o uid=youruid. Then, all files on that cifs share will be owned by you so that you can edit/remove them.

mount -o uid=1000 //nas/share /SharedMountPoint

You can find your numeric uid in /etc/passwd

grep `whoami` /etc/passwd | cut -d : -f 3


id -u `whoami`
  • Ahh - that did it. I did try setting the uid in the mount, but I thought it had to be the uid associated with the target files. Thanks
    – Visage
    Dec 30 '11 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.