Jump to content
Sign in to follow this  
dude67

Recommendations for a network drive for home use

Recommended Posts

Can you get to this stage? This should not require making modifications on client PC.

Yes, I'm there. I can manage e.g. the drive's IP in this configuration tool. But that's as far as I've got.

Edited by dude67

Share this post


Link to post
Share on other sites

Just one thing: Stay away from Western Digital drives. You have been warned...

Seven out of seven drives that failed me in the last 14 months are WD... two of them being the much advertized WD5000AAKS internal HD's, one of them 1TB MyBook- Essential Edition, and another one 160 GB WD Passport.

To be fair, WD replaced all seven drives (they all were within garrantee), but I kept none- sold them all and now working solely with Samsung and Hitachi/IBM drives (although I still have a couple of Seagates and one Maxtor drive busy).

Edited by scarecrow

Share this post


Link to post
Share on other sites
Just one thing: Stay away from Western Digital drives. You have been warned...

Seven out of seven drives that failed me in the last 14 months are WD... two of them being the much advertized WD5000AAKS internal HD's, one of them 1TB MyBook- Essential Edition, and another one 160 GB WD Passport.

To be fair, WD replaced all seven drives (they all were within garrantee), but I kept none- sold them all and now working solely with Samsung and Hitachi/IBM drives (although I still have a couple of Seagates and one Maxtor drive busy).

Thanks scarecrow, I have been warned. :) I just cannot say (at least at this point) that the drive is not working properly as they officially don't support linux. Only windows and I believe lately also OS X.

A NAS is a (small) PC, so let's boot it up after connecting it to your router and the router is configured to hand-out IP adresses via DHCP (99% chance yours is). Next step is to find out what IP address it lives on. Usually your router (try 192.168.0.1) can tell you what is connected to it. One of them is the PC you connect from, the other is the NAS. Open browser, type in 192.168.0.3 (or whatever the router tells you) and your router will welcome you (probably after a prompt for a password -- manual shoudl tell you what the default is).

 

Can you get to this stage? This should not require making modifications on client PC.

I don't know if I've said it clearly that I have been able to access the drive from Mandriva through http:// (w/ Konquerer and Firefox). I've set the IP manually to better suit the rest of my networks IP numbers. All the IPs in my LAN are manually set.

 

With the configuration tool in the drive (http://192.168.254.50), I can see that it's file system is CIFS. With the conf tool I can e.g. (i) create users (ii) add folders (iii) define rights to the folders for different users (iv) set the IP address automatically (DHCP) or manually amongst other things.

 

I cannot see another way of interacting with the drive though. If I try ftp'ing it 'ftp 192.168.254.50', it just says that I don't have access rights there. And I don't know how to (or even if I should) mount a network drive. In windows I should install the MioNet and get access to the drive with that tool.

Share this post


Link to post
Share on other sites

We are getting there -- slowly but surely. Check on your NAS what share(s) have been created. If none, create a small test one using the webinterface. Let's call this test. Having established that you can see the drive and that it uses CIFS as file-system I think this should work (al as root):

 

Add following line to /etc/hosts in order to define a name for your nas:

 

192.168.254.50   NAS

 

Obviously you can change the name to whatever you like (but I guess it is best to stay an alphanumerics and avoid the rest).

Create a mountpoint for the NAS.

mkdir /mnt/nas
chmod 777 /mnt/nas

Depending on usage you may want to have more restrictive permissions. Note that the software on the NAS will also define access, so I prefer to start with NAS accessible to all on the linux box. Next step is mounting the file-system of the NAS on your linux box. You can do this as root (and even automate this at boot by adding the appropriate line to /etc/fstab) or do it as a user:

 

mount -t cifs //nas/test /mnt/nas -o user=username-on-nas,pass=password-on-nas

If this works w/o errors, then you should be able to see what is on the nas by an ls /mnt/nas command (or via file-browser).

Share this post


Link to post
Share on other sites

Here's an update to the situation.

 

I now can see the drive and have been able to mount the NAS drive folders under my home folder like this:

/home/dude67/nas/folder1

/home/dude67/nas/folder2

/home/dude67/nas/folder3

 

I have a user set up in the NAS with the config tool provided, but due to some restrictions, I have been unable to use the same username I use in my Linux systems. Now, according to a suggestion I got, I've set this user ID and pw in KDE control center: Internet & network | Local network browsing | Windows share.

 

In MCC | network sharing | Share data with Windows system I have found this nas drive and set it up so that each of the folders I've created in the nas-drive (with it's own config tool) are mounted under my home folder (mount point) with the user ID and pw (Mount options) as I set up in nas (not the user ID and pw of my Linux user). As can be seen in the list above.

Now, this is my current problem:

I can see these folders fine with my current user ID (read rights), but I cannot get write rights to it! It only gives write access to my root account.

 

I've managed to copy files and subfolders to these nas-directories from my regular home folders by opening the nas folder with root rights in Konqueror. But that's kind of an awkward way of working with a network drive. I also tried to change the rights to the nas-folders (and it's new sub-folders) when the nas folder was opened with root rights, but I can only change the first tier folder's (the /nas folder) rights. For all of the sub-folders and files I get "no rights to this folder/files" answer.

 

Any ideas as how to get my regular user the read-write access to these nas folders?

 

Oh, I've also installed Webmin. I just thought there might be a tool within Webmin that could help me accomplish this. I must admit though, that I'm not so "fluent" with webmin, but I've used it briefly in the past.

Share this post


Link to post
Share on other sites

Standard Linux access control will prevent a user from accessing something he does not have access to. I think this applies here, i.e. another user than yourself (dude67 on your linuxbox) is owning the mountpoints. Because this user is different from yourself, you are barred access by your Linux system. 'root' bypasses all access control so can access it.

 

Can you post output of following commands:

mount
ls -l /home/dude67/nas

 

(I include the mount command on the offchance that it will show who is owning the mounts).

 

Assuming that dude67 does not own /home/dude67/nas (and the subfolders), but that another users owns these, I suggest you add dude67 to the group of this other user and ensure that /home/dude67/nas 'rwx' access for the group owning it (mode 770, like drwxrwx---). You can add dude67 to this other user's group via MCC, System, Manage Users.

Share this post


Link to post
Share on other sites

Here's mount

[dude67@localhost ~]$ mount
   /dev/sda6 on / type ext3 (rw,noatime)
   none on /proc type proc (rw)
   /dev/sda8 on /home type ext3 (rw,noatime)
   /dev/sda1 on /mnt/win_c type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
   /dev/sda5 on /mnt/win_d type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
   none on /tmp type tmpfs (rw)
   /dev/sda9 on /usr type ext3 (rw,noatime)
   none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
   /dev/sde1 on /media/hd2 type vfat (rw,nosuid,nodev,sync,users,umask=0,iocharset=utf8)
   sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
   nfsd on /proc/fs/nfsd type nfsd (rw)
   //nas/BU on /home/dude67/nas/BU type smbfs (0)
   //nas/DATA on /home/dude67/nas/data type smbfs (0)
   //nas/PUBLIC on /home/dude67/nas/public type smbfs (0)
   [dude67@localhost ~]$

and here's ls -l

[dude67@localhost ~]$ ls -l /home/dude67/nas
   total 16
   drwxr-xr-x 1 root root 4096 2008-03-30 16:22 BU/
   drwxr-xr-x 1 root root 4096 2008-03-30 16:23 data/
   drwxr-xr-x 1 root root 4096 2008-03-30 16:23 public/
   [dude67@localhost ~]$

To me this says that root owns these folders. But whenever I try to change (as root) the ownership, I get this:

Could not modify the ownership of
 file /home/dude67/nas/data. You have insufficient access
 to the file to perform the change.

Share this post


Link to post
Share on other sites

I made it with the help of a user in a Finnish forum! But I thought I'd report back here also. I got the user rights OK by doing the following.

  1. I unmounted the samba-shares
  2. Re-wrote the mounting with this addition of my linux user uid and gid
    //nas/data /home/dude67/nas/data smbfs credentials=/etc/samba/auth.nas.user1,uid=500,gid=500 0  0


  3. Re-mounted the samba-shares

I don't really know what I did wrong the previous times, but now I got it working.

 

Cheers to everyone who helped me here also!

 

This is my /etc/fstab if that's of any interest to anyone.

	 /dev/sda6 / ext3 noatime 1 1
 /dev/sda8 /home ext3 noatime 1 2
 //nas/DATA /home/dude67/nas/data smbfs credentials=/etc/samba/auth.nas.user1,uid=500,gid=500 0 0
 /dev/cdrom /media/cdrom auto umask=0,user,iocharset=utf8,noauto 0 0
 /dev/sdc1 /media/hd vfat umask=0,users,iocharset=utf8,sync,noauto,exec 0 0
 /dev/sda1 /mnt/win_c ntfs-3g defaults,locale=en_US.UTF-8 0 0
 /dev/sda5 /mnt/win_d ntfs-3g defaults,locale=en_US.UTF-8 0 0
 none /proc proc defaults 0 0
 none /tmp tmpfs defaults 0 0
 /dev/sda9 /usr ext3 noatime 1 2
 /dev/sda7 swap swap defaults 0 0

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...