LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NAS Permissions in Debian, What's Going On and How Do I Set (http://www.linuxquestions.org/questions/linux-networking-3/nas-permissions-in-debian-whats-going-on-and-how-do-i-set-870694/)

bruceam 03-24-2011 07:19 AM

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?

Question: How can I correct the problem.

camorri 03-24-2011 08:49 AM

What OS in on the NAS? Mine is a D-Link, and it runs linux. If yours is windbloze, that may be a big part of the problem.

kabars_edge 03-24-2011 01:55 PM

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?

bruceam 03-24-2011 02:30 PM

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.


I hope this sheds some light on the subject.

kabars_edge 03-25-2011 10:35 AM

Quote:

Originally Posted by bruceam (Post 4302067)

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
However, YMMV.

HTH,

bruceam 03-25-2011 02:47 PM

kabars_edge
Thanks for the mount information. I mounted the NAS drives using your suggested method, but unfortunately, the permissions issue was unchanged.

I do appreciate the information though.

bruceam 03-25-2011 03:04 PM

I believe I may have happened on the OS for the SmartStor NS4300N. A response line which printed out when I attempted to log in as admin was

"BusyBox v1.00-rc2 (2006.11.07-01:55+0000) Built-in shell (ash)"

I don't know if this is the OS or not, but someone out there may recognize it and know what to do.


Quote:

Originally Posted by camorri (Post 4301664)
What OS in on the NAS? Mine is a D-Link, and it runs linux. If yours is windbloze, that may be a big part of the problem.

I hope this helps.

camorri 03-25-2011 06:16 PM

For what its worth, here is a link that describes BusyBox.

http://www.icewalkers.com/Linux/Soft...0/BusyBox.html

The latest stable version is 1.16.2. At least we know it is not windoze.

Have you looked at the manufacturers web site to see if there are any updates you could apply?

d90mhz 04-13-2011 04:15 AM

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.

Hope this helps.

kabars_edge 04-14-2011 10:03 AM

Bruce,

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.

Quote:

//192.168.1.99/BRUCE /home/penguin/bruce nfs rw,intr 0 0
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.

http://firstweb.promise.com/upload/S...0N_PM_v1.4.pdf

So configure the NAS to export the share to the IP address of your Unix/Linux box, then you should be able to directly mount via

Quote:

mount 192.168.1.99/BRUCE /home/penguin/bruce
HTH,

d90mhz 04-15-2011 04:01 AM

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.

bruceam 04-20-2011 03:50 PM

Thanks for the information. I will give it a try, but I think you may have it dead on.


Quote:

Originally Posted by d90mhz (Post 4325257)
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.



All times are GMT -5. The time now is 06:43 AM.