NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
jfisher1
Jan 04, 2012Aspirant
chown not working
Hi,
I have a ReadyNas duo and have installed the EnableSSH.
When i ssh to the NAS as the root and tried to do a chown to other NAS user, it would never work. The file/folder i tried to change ownership on keeps owned by the root. I'm not a linux guy so is there any reason why this is not working?
Thanks in advance.
I have a ReadyNas duo and have installed the EnableSSH.
When i ssh to the NAS as the root and tried to do a chown to other NAS user, it would never work. The file/folder i tried to change ownership on keeps owned by the root. I'm not a linux guy so is there any reason why this is not working?
Thanks in advance.
10 Replies
Replies have been turned off for this discussion
- WhoCares_MentorWhat was the exact command you were using? And what was the output? Because chown works just fine so I guess it's just a little typo somewhere in your command line.
-Stefan - jfisher1AspirantHi Stefan:
I was using "chown peter public", where "peter" is the username i want to change the ownership to and "public" is the target folder name.
After the command I did a "ls -al" and still see the "public" folder is owned by root.
Not sure if i issued the command correctly? I was following the direction here:
http://linuxcommand.org/lts0070.php
Thanks! - WhoCares_MentorThe syntax you used should be ok. Just tried locally on my ReadyNAS and it worked as expected. And you didn't receive any output stating any sort of problem? Can you post the "ls -al" output?
-Stefan - MastacheataAspirantAre you sure it didn't change the owner?
Have you maybe misinterpreted the group column of ls for the owner?
Does "chown username.groupname foldername" work? - jfisher1AspirantAfter more digging, I found out the chown wouldn't work in the USB hard drive share that is attached to the ReadyNAS. Those regular shares created in the NAS hard drive are fine.
Following is the chown output made to the folder in a regular share "data".
whale:/data# chown peter:users public
whale:/data# ls -l
total 48
drwxrwx--- 3 root users 16384 Jan 7 14:11 Network Trash Folder
drwxr-xr-x 2 peter users 16384 Jan 7 01:13 public
drwxrwx--- 3 root users 16384 Jan 7 14:11 Temporary Items
whale:/data#
--------------------------------
Following is the chown output made to the folder in the USB hard drive share "USB_HDD_2"
whale:/USB_HDD_2# mkdir testfolder
whale:/USB_HDD_2# ls
media System Volume Information testfolder
Network Trash Folder Temporary Items
whale:/USB_HDD_2# ls -l
total 4
drwxrwxrwx 1 root root 4096 Jan 7 01:16 media
drwxrwxrwx 1 root root 0 Feb 27 2011 Network Trash Folder
drwxrwxrwx 1 root root 0 Mar 8 2011 System Volume Information
drwxrwxrwx 1 root root 0 Feb 27 2011 Temporary Items
drwxrwxrwx 1 root root 0 Jan 7 14:58 testfolder
whale:/USB_HDD_2# chown peter:users testfolder
whale:/USB_HDD_2# ls -l
total 4
drwxrwxrwx 1 root root 4096 Jan 7 01:16 media
drwxrwxrwx 1 root root 0 Feb 27 2011 Network Trash Folder
drwxrwxrwx 1 root root 0 Mar 8 2011 System Volume Information
drwxrwxrwx 1 root root 0 Feb 27 2011 Temporary Items
drwxrwxrwx 1 root root 0 Jan 7 14:58 testfolder
whale:/USB_HDD_2#
--------------------------------
Both are using root login. Not sure why there is any different. So I check the share access configuration in the ReadyNAS Frontview. Everything seems right, except the ownership. In the Share Listing->USB Share->Advance Option, the [Share Folder Owner] and [Share Folder Group] are always assigned to "root". No matter what I changed it would always revert back to "root" after saving.
I'm not sure if this is the root cause. I also don't remember how to create this USB Share since it was long time back.
Anyone has any idea on how to fix this?
Many thanks. - sphardy1ApprenticeYour USB drive is probably formatted as FAT32 which does not support the concept of file/folder ownership - therefore under Linux all files/folders default to the owner of the mounting process, root in this case
- jfisher1AspirantThanks sphardy. This USB was from my Windows PC and was formatted as NTFS. So I tried to remotely connect this USB share via "net use u: \\192.168.0.5\USB_HDD_2 /user:root" and put in the root password when prompted, however it keeps saying Access Denied, although I'm sure I put in the right password.
Can I not remote map the share by using root from Windows?
I tried using another account - "admin" and was able to map this share, however when I tried to change the folder Permission via Windows, it kept saying "Access denied". I believed this is due to the folder is solely owned by root. But I was not able to access via root. So it seems i'm in a dead lock. Any work around? - sphardy1ApprenticeNone that I'm aware of - there are a number of posts relating to this but I've yet to see anyone publish a solution.
- MastacheataAspirantCan't you take ownership from your windows computer's Admin Account?
Not really sure how that option is called in english windows, but it's usually offered automatically whenever a folder is inaccessible by the current user. - jfisher1AspirantNo, attempting to take ownership, you will still get access denied.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!