Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
    
Do you have the error messages backwards? –  Dave Oct 20 '10 at 20:39
    
This 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. –  DerfK Oct 20 '10 at 20:42
    
Sorry DerfK, you're right. I've updated the command. /dev/fileserver is an empty directory –  Webnet Oct 20 '10 at 20:49

3 Answers 3

up vote 6 down vote accepted

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.

share|improve this answer
    
Sweet, thanks! fStab looks a bit different than a simple mount. Is that the right location to mount this on bootup? –  Webnet Oct 21 '10 at 13:58
1  
I'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 using mount /dev/fileserver. The user option also sets up permissions suitable for the user running the command, at least on vfat. –  DerfK Oct 22 '10 at 1:56
    
On 12.04 I had to add a ,nounix option before my mount would be world read/write. –  CatShoes Aug 22 '13 at 13:25

Your order of operations appears to be wrong. It should read:

mount -t [type] [-o mount options] [mount source] [mount destination]
mount -t cifs -o username=user,rw //192.168.15.10/web /dev/fileserver

You will be asked for your password. That should get the volume mounted.

share|improve this answer
    
That works, but it doesn't mount it as writable –  Webnet Oct 20 '10 at 20:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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