0

I've been mounting my network share with the following entry under crontab:

sudo mount //192.168.1.1/usbdrive /home/pi/usbdrive

Since yesterday I've been unable to write information to it because the owner is set as root and write permissions are set to owner only. I've now tried to do this via fstab:

//192.168.1.1/usbdrive  /home/pi/usbdrive  cifs  iocharset=utf8,file_mode=0777,dir_mode=0777,sec=ntlm  0  0

Unfortunately, the directory is still being mounted under owner=root.

Can anyone shed some light on this?

Sometimes the usb stick runs into an issue where I need to unplug it from my router. I was thinking that it might have caused some problem. However, I am able to access the share via my Windows machine, so it seems to be working correctly on the router's side.

I've deleted the /home/pi/usbdrive and started over, with reboots in the middle. Nothing worked.

Appreciate the inputs.

0

This might help you. it says that you can mount a drive with certain rights using:

 mount -t deviceFileFormat -o umask=filePermissons,gid=ownerGroupID,uid=ownerID /device /mountpoint
|improve this answer|||||
  • Specifying GID and UID in the fstab parameters did the trick. I still wish that I knew what made it stop working. Thanks! – Mike Sep 1 '17 at 8:14
  • 1
    For completeness sake, here's the full line: //192.168.1.1/lexar /home/pi/usbdrive cifs iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,sec=ntlm 0 0 – Mike Sep 1 '17 at 8:43

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.