0

My main user is UID=1001, but when I create files on a mounted drive, they end up with ownership of UID-1000... Other users on this machine don't have the issue.

How might I fix this?

  • You will have to be more specific. What does this have to do with samba? Is this a locally mounted drive or network share? How is it being mounted? – psusi May 28 '14 at 1:09
2

This is probably part of the mount command you used or the fstab entry you created for that particular mount.

If you followed a wiki page you may have created a line in file /etc/fstab that looks like:

//servername/sharename  /media/windowsshare  cifs  guest,uid=1000,iocharset=utf8  0  0

Replace uid=1000 with uid=1001 and you will be fine.

Edit

If you have another user with UID 1000 then he/she will end up having exactly the same problem. The way around that is not to use /etc/fstab but both of you have an autostart script that does:

mount -t cifs //servername/sharename  /media/windowsshare-userX -o guest,uid=100X,iocharset=utf8

You will need to replace userX and 100X with the correct values, create directories /media/windowsshare-userX and set the owher of these directories to be the respective user.

  • That is so unbelievably simple that I am upset that I didn't try it. Thank you! – The Dingman May 28 '14 at 1:16
  • Make sure you check what I wrote after Edit and not create a problem for an eventual other user of the same machine. – sмurf May 28 '14 at 1:21

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.