Mount NTFS (read/write capability) on Ubuntu
For network windows shares you need to specify the uid/gid that the drive should be mounted as and/or the file and directory modes to use since Windows doesn't understand Unix users and Linux doesn't understand Windows users or permissions. Right now, the share is probably writable but everything is owned by root so no other user can do anything.
Try:
mount -t cifs -o username=winuser,rw,uid=linuxuser,gid=linuxgroup //192.168.15.10/Web /dev/fileserver
Where linuxuser and linuxgroup are both your username in Ubuntu. If you need to make the windows share writable to everyone, then you can use ,dir_mode=0777,file_mode=0666
instead of uid= and gid=. If you need some people to have access and others not to, then you can combine both of them:
mount -t cifs -o username=winuser,rw,gid=somegroup,dir_mode=0775,file_mode=0664 //192.168.15.10/Web /dev/fileserver
which will give write access to all members of somegroup
but everyone else will only have read access.
Related videos on Youtube
Ben
Updated on September 17, 2022Comments
-
Ben over 1 year
I'm trying to mount
Windows 2000
shared folder on Ubuntu in an effort to get Read/Write capabilities. Any advice?I've verified that the user credentials have writable permissions from a windows machine.
update
`sudo mount -t cifs -o username=web,password= //192.168.15.10/Web /dev/fileserver` //mounts as read-only
-
David over 13 yearsDo you have the error messages backwards?
-
DerfK over 13 yearsThis doesn't even begin to make sense... are you doing this over a network or not? If it's over a network, then CIFS is the protocol to use, but doing so wouldn't return an "ntfs-3g" error. The last parameter to mount should be an empty directory to mount into, not a device name.
-
Ben over 13 yearsSorry DerfK, you're right. I've updated the command.
/dev/fileserver
is an empty directory
-
-
Ben over 13 yearsThat works, but it doesn't mount it as writable
-
Ben over 13 yearsSweet, thanks! fStab looks a bit different than a simple
mount
. Is that the right location to mount this on bootup? -
DerfK over 13 yearsI'd suggest against trying to mount network partitions during boot, depending on your network (are you on wireless?) your internet connection might not be ready when the system is trying to mount the drive, which could lead to Bad Things (or at least a very long boot time while the mount times out). Instead, add it to fstab with the
noauto,user
options added, which will tell it not to mount on boot, but give permission for regular users to mount it usingmount /dev/fileserver
. Theuser
option also sets up permissions suitable for the user running the command, at least on vfat. -
CatShoes over 10 yearsOn 12.04 I had to add a
,nounix
option before my mount would be world read/write.