[ubuntu-uk] Connecting to a NAS drive in Ubuntu
matt at daubers.co.uk
Sat Jul 11 12:42:46 BST 2009
On Sat, 2009-07-11 at 10:04 +0100, David King wrote:
> I am trying to connect to my NAS drive in Ubuntu 9.04.
> I used to be able to do it when running Ubuntu 8.04, but now when I
> mount the NAS drive, the group is set to 501, and the owner is set to
> 501 - User #501
> and thus I cannot access any files on the NAS drive. I can read the
> directory listings, but I have files on there I need to access, but I
> cannot access them. I have tried
> sudo nautilus
> to get root access but permission is denied still for reading any files.
> I tried to set up a group called 501 but Ubuntu told me it had to start
> with a letter.
> I used the following command to mount the NAS
> sudo mount -t cifs '//192.168.0.4/DISK 1' /media/nas1
> which mounts it okay.
> I used to use sudo mount -t smbfs '//192.168.0.4/DISK 1' /media/nas1
> which also works to mount, but read that cifs has now replaced smbfs,
> but neither option allows me to access any files.
> I have samba, smbfs, and gadmin-samba installed.
> I also tried switching off the NAS and then on again, and then mounting
> it again.
> How can I gain read-write access to my files on the NAS?
> David King
You need to tell the mount line to override the uid and gid of the
files. This can be done with the options switch on the mount line like:
sudo mount -t cifs '//192.168.0.4/DISK 1' /media/nas1 -o
You'll need to look up the id for your user and your group, you can find
that info in /etc/group, which will look like "yourgroupname:x:gid:" and
If you're the first user they'll probab;y both be 1000.
Hope that helps!
More information about the ubuntu-uk