LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 01-23-2009, 03:32 PM   #1
bruceam
Member
 
Registered: Nov 2008
Location: Atlanta, Georiga
Distribution: Debian, Ubuntu
Posts: 65

Rep: Reputation: 15
Equal Access to files on a NAS form Debian and Windows?


I have purchased a Turn Key NAS device and successfully added it to my home network. I have a directory on this devices which I have mapped via windows to an old Windows machine. I am attempting to mount this same directory to a folder in my Debian 4.0.1 machine so that I can also read, write, and erase files. I have managed to make the mounting automatic on boot up, and I can see and open any of the files there.

Problem: I cannot alter any of the files on the NAS from my Debian box, nor can I create a new file and store it there.

Question: How do I configure the system so that I have full access to the NAS directory from both of the Debian machine and the Windows machine?

Thank you for your time and assistance.


BruceAM
 
Old 01-24-2009, 10:13 AM   #2
mattcantgetsome
LQ Newbie
 
Registered: Mar 2007
Posts: 16

Rep: Reputation: 0
Did you try changing permissions? Open up a terminal and switch to the path that the device is in

cd /path/to/device

Then try typing ls-l and it'll give you a list of the files with their respective permissions. Make sure that read, write, and execute privileges are enabled. To do so, you can try

chmod u+rwx

I believe that's the correct code. Let me know if you need any clarification.

P.S. This is from a newbie to a newbie, so don't be too harsh on me

Matt
 
Old 01-24-2009, 09:06 PM   #3
es0teric
Member
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 105

Rep: Reputation: 19
What filesystem is the NAS formatted as? NTFS?

If it is an NTFS filesystem, then I don't believe Linux permissions (and therefore, the chmod solution) would be applicable. The problem is more likely that the drive is mounted read-only rather than read-write. To remedy that, try mounting the drive using the 'rw' modifier.
 
Old 01-25-2009, 11:49 PM   #4
bruceam
Member
 
Registered: Nov 2008
Location: Atlanta, Georiga
Distribution: Debian, Ubuntu
Posts: 65

Original Poster
Rep: Reputation: 15
I have tried this function, but it didn't work. I think the issue has something to do with how the sharing or file access is setup on the NAS. I will continue to work in this, but thank you very much for your assistance. I will remember this command and figure out how to use it properly.


Thanks again.

BruceAM.
 
Old 01-25-2009, 11:57 PM   #5
bruceam
Member
 
Registered: Nov 2008
Location: Atlanta, Georiga
Distribution: Debian, Ubuntu
Posts: 65

Original Poster
Rep: Reputation: 15
I do not know what file system the NAS uses. It is capable of supporting both windows, and Linux. The information page of the NAS setup indicates that the OS is Embedded Linux. The NAS is a Promise Technology SmartStor NS4300N. Unfortunately, the only access I have to the NAS setup, is through the manufacturer's setup window, so I am at a loss when it comes to gaining access the the low level operation of the system. I have check, though, and when I mount the directory to my local drive, I am using the -rw switches.

Thanks for your help. I will keep looking.

BruceAM




Quote:
Originally Posted by es0teric View Post
What filesystem is the NAS formatted as? NTFS?

If it is an NTFS filesystem, then I don't believe Linux permissions (and therefore, the chmod solution) would be applicable. The problem is more likely that the drive is mounted read-only rather than read-write. To remedy that, try mounting the drive using the 'rw' modifier.
 
Old 02-27-2009, 07:59 AM   #6
cnick79
LQ Newbie
 
Registered: Nov 2003
Posts: 3

Rep: Reputation: 0
I have the same NS4300N as you and I have the same problem trying to create and copy and move files on my Ubuntu box. It seems I can copy files from my Ubuntu machine to the shared NAS mount but if try to copy a folder I get permission denied errors. Did anyone find a solution this problem? When I ls -l /media/NAS/ I notice this:

drwxrwxrwx 38 1001 499 0 2009-02-26 23:50 Apps

Is 499 the group Apps belongs to?
 
Old 02-27-2009, 08:49 AM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Does the NAS box support NFS? If not it may support the cifs filesystem, which would allow you to use Linux permissions and acls.

The permissions on a vfat or ntfs filesystem doesn't support Linux permissions, and you need to set the permissions with how it is mounted. Either through the properties tag on the desktop icon, or by mounting it and including permissions with the mount.
dmask
sudo mount -t cifs //nas-device/share /mnt/mount_point -o rw,uid=<your_usernmame>,gid=<your_group>,fmask=0117,dmask=0007,utf8

If the device supports cifs, and a Linux filesystem like ext3 is used inside the device, then you can change permissions on files and directories, and even use setfacl & getfacl. If a windows filesystem is used and/or only smbfs is supported, then the uid,gid,fmask,dmask options are fallbacks and determine the permissions of the files and directories. For security reasons, don't set the 'x' bit for files on mass storage filesystems; but you need the 'x' bit for directories. Hence, fmask & dmask are used instead of simply umask.

You can also create an fstab entry and even be able to mount it as a normal user:
//nas-device/share /mnt/mount_point cifs rw,uid=<your_username>,gid=<your_group>,fmask=0117,dmask=0007,noauto,user,utf8

---

Running nmap to see which ports the NAS device has open will tell you if both windows smb (or cifs) and nfs are supported.
Code:
tarting Nmap 4.75 ( http://nmap.org ) at 2009-02-27 07:54 CST
Interesting ports on hpmedia.jesnet (192.168.1.104):
Not shown: 994 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
111/tcp  open  rpcbind
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
2049/tcp open  nfs
3306/tcp open  mysql
Ports 111 & 2049 are used for NFS. Ports 139 & 445 are used by Samba/Windows.
Older 98 & 95 hosts used 137-139 & 445 for windows.

If you see ports 111 and 2049, then use NFS instead.

Last edited by jschiwal; 02-27-2009 at 08:57 AM.
 
Old 02-27-2009, 12:31 PM   #8
cnick79
LQ Newbie
 
Registered: Nov 2003
Posts: 3

Rep: Reputation: 0
I believe this NAS uses the ext3 file system. I am going to double check how I have the NAS mounted. On the NAS box I had to create a user name and password. The username happens to be the same as what I use on my linux box. Would this pose any problems? I will look into this when I get home this evening.
 
Old 02-27-2009, 06:35 PM   #9
cnick79
LQ Newbie
 
Registered: Nov 2003
Posts: 3

Rep: Reputation: 0
I ran nmap and here is what it returned:

Code:
PORT     STATE SERVICE
21/tcp   open  ftp
80/tcp   open  http
111/tcp  open  rpcbind
139/tcp  open  netbios-ssn
443/tcp  open  https
445/tcp  open  microsoft-ds
515/tcp  open  printer
837/tcp  open  unknown
839/tcp  open  unknown
850/tcp  open  unknown
1024/tcp open  kdm
2049/tcp open  nfs
This is my fstab entry to mount the NAS:
Code:
//192.168.0.25/Files /media/NAS cifs rw,uid=1000,username=nick,password=***,fmask=0117,dmask=0007 0 0
Still no such luck. Strange thing is I commented out this entry in my NAS and it still mounted so I am not sure where and how the NAS is being mounted now. Also, I created a new linux user that had a userid of 1001 and was able to copy files without problems.

EDIT: I think the problem is solved. I thought logging out and logging back in would remount the drives. I rebooted instead and things seem better.

Last edited by cnick79; 02-27-2009 at 06:48 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Buffalo NAS - how do we get files on NAS syncing with Windows Sync? bykerbob Linux - Newbie 0 10-21-2008 09:59 PM
copy files form windows app to samba share procfs General 1 07-19-2006 07:13 AM
copy files form Linux to Windows OS zillah General 4 02-02-2006 04:24 PM
Access EXT3 partition form windows Wynand1 Linux - Newbie 6 03-05-2004 06:19 AM
Transfering Files form Linux to Windows Ricky22 Linux - Networking 6 06-09-2002 07:01 AM


All times are GMT -5. The time now is 01:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration