NAS Permissions in Debian, What's Going On and How Do I Set
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
NAS Permissions in Debian, What's Going On and How Do I Set
I have a Promise Technologies SmartStor NS4300N Network Attached Storage device. I have a brand new install with blank disks setup.
I have mounted these network drives onto my local machine using the "mount" command. I have logged into the NAS using the same username and password that I am running from on my Debian Desktop machine.
Problem: When I attempt to copy data to the locally mounted NAS Directories, I am seeing permission errors. The directories that I am copying appear in the new file list, but they are read only. I receive an error message telling me that I do not have permissions to write to the directory that I just created. I went to the command line and using "sudo" attempted to change the ownership and permissions, but I received more error message indicating that I don't have permission to do this either. I am able to copy files directly into the mounted directory, and I and open them, modify them, and delete them. I can even delete the new directory that I cannot seem to story anything in.
Question: Shouldn't the files I copy onto my subdirectory of the NAS (which uses the same username and password as the machine the directory is mounted onto) be available to me with full permissions?
Are you manually mounting these or are you mounting them through fstab? Please copy and paste the mount syntax you are using. Additionally, if it is a NAS, how are you presenting the new storage to the system, over ethernet, or are you using a fiber channel NAS, and preseting LUNs?
camorri: I do not know what operating system the NAS is using. I checked the system information tab and it said only, Embedded Linux, and gave 01.05.0000.12 version number. I suspect this is a proprietarily customized OS by Promise Technologies.
kabars_edge: I am manually mounting the directory. I have included the command I use for this purpose below:
mount -t smbfs //192.168.1.99/BRUCE /home/penguin/bruce -o "username=<username>,password=<password>",-rw
I execute this command by preceding it with the "sudo" command.
mount -t smbfs //192.168.1.99/BRUCE /home/penguin/bruce -o "username=<username>,password=<password>",-rw
I can tell you this much, you need to abandon the use of smbfs, and use cifs. smbfs is known to have many issues and is no longer supported by the samba team. so try
Quote:
mount -t cifs //192.168.1.99/BRUCE /home/penguin/bruce -o "username=<username>,password=<password>",-rw
kabars_edge
Thanks for the mount information. I mounted the NAS drives using your suggested method, but unfortunately, the permissions issue was unchanged.
bruce, I have the same NAS and thanks to this post I've finally got ANY mount command to work for me. So thanks!
As for the permissions issue, I believe since the NAS is running it's own filesystem on it's own linux, if you want to share those files with your other linux machines you'll need to manage the user/groups to sync with all your machines.
Basically, the files on the NAS have *some* user ID (lets assume that's 1001) and *some* group ID (lets assume that's 500), along with each file having it's own permissions. Depending on how much you want to share, you'll want to configure your other linux machines to add particular users to group 500, or even make a user with the ID 1001 to simply act as the owner of those files.
E.G. When I set up my NAS (before I had any linux machines) I made a user named "Family" and a group named "Family". If you look at the /etc/passwd file on your NS4300, you'll see that user. (On my machine they started the users in the 1000s and the groups in the 500s, so the user ID is 1001 and the group is 500.) On my linux box, I then made a user named "Family" with the ID 1001 and had them in the "Family" group with the ID of 500. Obviously you don't need to match the names of the user and group, but I did. It is important to match the IDs. With this change, when I log in as Family on my linux machine, I have ownership of all the files on my NAS mount.
If your NAS is running Busybox, then you do not need to be mounting that as a CIFS/SMBFS partition, but you need to mount it as a NFS partition. Additionally, try mounting it from your fstab.
Also, with most NAS devices, you have to export the share to the system mounting it; although I'm using a $5,000,000 NetApps, I'm sure they all work pretty much the same way. The thing is it appears that you have to configure it from a Windows PC first to export it to the Unix/Linux system. Below is a link to the PDF for setting up your specific NAS.
For posterity and perhaps to help out other watchers, I'll say that this command does not work on my NAS.
I'm running version 01.05.0000.08 of the firmware on a Promise NS4300N and with that mount command, I get the following:
user@linux1:~$ sudo mount 192.168.1.101:/Volume1/Public /nas/public
mount: wrong fs type, bad option, bad superblock on 192.168.1.101:/Volume1/Public,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
Or, I get this if I specify auto:
user@linux1:~$ sudo mount -t auto 192.168.1.101:/Volume1/Public /nas/public
mount: special device 192.168.1.101:/Volume1/Public does not exist
However, the samba (or cifs, rather) mount works just fine. It appears the unix export on the NS4300 is messed up somehow and I can only access it through the windows share.
Permissions through this method don't seem to be a problem for me, however.
Thanks for the information. I will give it a try, but I think you may have it dead on.
Quote:
Originally Posted by d90mhz
For posterity and perhaps to help out other watchers, I'll say that this command does not work on my NAS.
I'm running version 01.05.0000.08 of the firmware on a Promise NS4300N and with that mount command, I get the following:
user@linux1:~$ sudo mount 192.168.1.101:/Volume1/Public /nas/public
mount: wrong fs type, bad option, bad superblock on 192.168.1.101:/Volume1/Public,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
Or, I get this if I specify auto:
user@linux1:~$ sudo mount -t auto 192.168.1.101:/Volume1/Public /nas/public
mount: special device 192.168.1.101:/Volume1/Public does not exist
However, the samba (or cifs, rather) mount works just fine. It appears the unix export on the NS4300 is messed up somehow and I can only access it through the windows share.
Permissions through this method don't seem to be a problem for me, however.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.