Author Topic: Can't write to NAS drive - Solved (Kind of)  (Read 1882 times)

Offline philld

  • Full Member
  • ***
  • Posts: 132
Can't write to NAS drive - Solved (Kind of)
« on: February 19, 2011, 08:15:18 PM »
Having one nagging problem with completing the setup of a new NAS device (WD My Book World Edition II).  I can connect (samba) to the shares on the drive but cannot write to them from my PCLinuxOS machine.  To check the share, tried it from a Windows XP laptop and first attempt it was able to copy a file to the share.

When I look at the mount I noticed that the share has r-x for permissions against it.  Unmounted the drive, and tried to change the permissions on the share so that "Other" could both view and modify but when I did that I get the message to the effect that I was not authorized to do so (was using root access at the time).

Here is my fstab
# Entry for /dev/sdb1 :
UUID=8a8f5496-9f04-41b9-bfd0-4f09eae234a7 / ext3 defaults 1 1
none /dev/pts devpts defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
# Entry for /dev/sdb6 :
LABEL=homedir /home ext3 defaults 1 2
//192.168.0.54/Volume_1 /mnt/DMedia cifs auto,user,username=% 0 0
//192.168.0.50/LP2_WinC /mnt/LP2_WinC cifs auto,user,username=% 0 0
//192.168.0.50/LP2_WinF /mnt/LP2_WinF cifs auto,user,username=% 0 0
//192.168.0.53/Volume_1 /mnt/Media cifs auto,user,username=% 0 0
//192.168.0.55/Public /mnt/WMedia cifs auto,user,username=% 0 0
# WMedServe:/DataVolume/Public /mnt/Public nfs rsize=8192,wsize=8192,nosuid,soft 0 0
# Entry for /dev/sdb1 :
UUID=1ED42188D421636F /mnt/windows ntfs-3g defaults,umask=000 0 0
none /proc proc defaults 0 0
# Entry for /dev/sdb5 :
UUID=de56d527-d11d-4f18-90fe-57cac729d3d1 swap swap defaults 0 0

I highlighted the share that I'm having problems with (/mnt/WMedia).  Have also tried to access via "nfs" (have since commented it out in the fstab above) but no success there either.

Any suggestions would be appreciated as to what I have overlooked.

« Last Edit: February 20, 2011, 06:38:05 AM by philld »

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Can't write to NAS drive
« Reply #1 on: February 19, 2011, 08:34:24 PM »
Hi,

I take a look at your fstab supposing that all others shares works ...
... have you checked the permission of the directory client side: /mnt/WMedia ?

AS

Offline philld

  • Full Member
  • ***
  • Posts: 132
Re: Can't write to NAS drive
« Reply #2 on: February 19, 2011, 09:10:26 PM »
Yes - all the other shares are working correctly.  From the client side for /mnt/WMedia - the share is identified as having full access.  The fact that I was able to write to the share from a Windows XP machine would suggest that the permissions on the client are not preventing the writing to the share.

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Can't write to NAS drive
« Reply #3 on: February 19, 2011, 09:22:29 PM »
There should be a misunderstanding:

That's OK:
[ MY BOOK //Public ]     <-------------   [ XP can read and write in // Public ]


That's no OK:
[ MY BOOK //Public ]     -------------->  [ mounted to /mnt/WMedia ]

Have you checked the permission of the directory /mnt/WMedia ?

AS


Offline philld

  • Full Member
  • ***
  • Posts: 132
Re: Can't write to NAS drive
« Reply #4 on: February 19, 2011, 09:47:09 PM »
Sorry - I think this is what you are asking.  When I check permissions for /mnt/WMedia they show as:
Owner - Can View and Modify content
Group - Can View and Modify content
Others - Can View content
Ownership
User - root
Group - ???

If I try to change "Others" to be the same as Owner and Group i.e. "Can View and Modify content" from the "root" account, I get the message "Access denied to /mnt/WMedia".  Same if I try to change the group.  While I was logged on under the "root" account, I tried to write to the NAS and was able to do so.  Thus, possible to write from the root account but not from the user account on the PCLinuxOS machine.  I was surprised to get the "Access denied" message when logged in as "root" - not sure if I should have unmounted the share before trying to change the permissions or not.

Also, to clarify on the /mnt/Public (the NFS access) - no success with this one at all - can't even mount it successfully.

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Can't write to NAS drive
« Reply #5 on: February 20, 2011, 04:26:12 AM »
Hi philld,

try the following commands from a root account of PCLOS machine:

umount /mnt/WMedia
chmod 777 /mnt/WMedia
mount /mnt/WMedia

then try to access the files on the "share".

AS

Offline philld

  • Full Member
  • ***
  • Posts: 132
Re: Can't write to NAS drive
« Reply #6 on: February 20, 2011, 06:37:14 AM »
Thanks AS - did try changing the permissions so that "Others" could also read and write but get the message that I was denied access (even as root).  I did find a workaround however.  When logged in a root, the Ownership showed the user as "root" and the group as "1000".  Not sure where the 1000 came from as there was no such group on the system.  So I created a group called "wd" and gave it the group id of "1000".  Added both the root id and the user id, logged out of root, into the user id and was able to write to the NAS.  Not the solution I would have preferred but it works!

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Can't write to NAS drive - Solved (Kind of)
« Reply #7 on: February 20, 2011, 07:01:06 AM »
Glad you solved (kind of) your problem.

There was symptoms about "group related problem" from your reports, but not clearly understandable from here:
Quote
Owner - Can View and Modify content
Group - Can View and Modify content
Others - Can View content
Ownership
User - root
Group - Huh


Have fun, AS