How to mount a folder with writing permissions?

How to mount a folder with writing permissions?

Alternatively you can mount the windows partition in RW at /media/windows ( instead of /root/win) and immediately bind mount it at the same mount point (/media/windows) so that no one (even root) can write on the partition (but on the user folder). I doubt that the linked superuser answer is a working one.

How to change permissions on mounted windows share?

(definitions of noperm and nosetuids are found in the mount.cifs manpage) Also, think about using a credentials file instead of having your name/pw in the clear: since fstab can be read by all. I hope you found out your answer by the way I think this issue is not related to samba option, I think this is for ntfs permission level.

Can you change the permissions of a mount point?

And changing the permission of the mount point before anything is mounted to it will have no affect either since the permissions after a mount always replace the permissions before the mount. If the desired permissions is 777 change your mount command to include those permissions: dir_mode=0777,file_mode=0777.

Where do I write a Linux Mount file?

If your Linux Distribution and its kernel are recent enough that you could mount the network share as a normal user (but under a folder that the user own), you will have the proper credentials to write file (e.g. mount the shared folder somewhere under your home directory, like for instance $HOME/netshare/.

Is there a way to mount a partition without Sudo?

You can go ahead and add the user option so that a regular user without sudo can mount it should it be unmounted. For practicality, the best option here is chown as it gives the user the needed permissions instantly.

Which is the best command to mount a partition?

You can go ahead and add the user option so that a regular user without sudo can mount it should it be unmounted. For practicality, the best option here is chown as it gives the user the needed permissions instantly. The chmod command can be used afterwards if the permissions need to be modified for others.

Can You mount an image file without root permission?

You can’t mount anything that the administrator hasn’t somehow given you permission to mount. Only root can call the mount system call.