LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-16-2009, 04:15 PM   #1
fish_hawk
LQ Newbie
 
Registered: Jul 2009
Distribution: Karmic 9.10
Posts: 9

Rep: Reputation: 0
Unable to modify Owner of directory - Ubuntu 9.01


Hopefully this is not a blatant re-post of another thread, I did try searching the forums prior to posting this. Anyway, here's my issue:

I have an external hard drive attached via USB to my Ubuntu box, set to a mount point of "/storage/500G". When I do an ls -l on the /storage directory it spits out the following:

dr-xr-xr-x 1 root root 4096 2009-12-16 08:28 500G
drwxrwxrwx 9 matt matt 4096 2009-12-16 15:48 maxtor160

I've tried to do the "chown -R matt:matt "/storage/500G"" command on it, and it thinks about for awhile and acts like it is working, but then when I "ls -l" the directory again the output is identical to the first time I did it. I was expecting the "root root" entry would change to "matt matt".

The problem is that I cannot move files to this directory via the command line since I do not have write permissions on this.

I also tried to do a "sudo chmod 777 -R "/storage/500G"", but this did not have any effect on the permissions.

Can anyone tell me how to change the owner of this directory? I'm afraid I'm about to hose my system if I do any more chown -R commands...

Thanks!
 
Old 12-16-2009, 04:50 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,441

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
Close; chown means change owner, chmod means change mode (aka permissions).
Try

sudo -i bash
which should put you in a new shell as root. You should be able to work from there.
 
Old 12-16-2009, 06:52 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
What file-system(s) do those devices have?
 
Old 12-16-2009, 07:16 PM   #4
fish_hawk
LQ Newbie
 
Registered: Jul 2009
Distribution: Karmic 9.10
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the quick response!

Quote:
Try

sudo -i bash
which should put you in a new shell as root. You should be able to work from there.
I gave this a go and still no luck.

Quote:
What file-system(s) do those devices have?

According to Gparted - NTFS, Fdisk from the terminal also mentions HPFS.

Do you think my issue is due to the NTFS?

Thanks,
 
Old 12-16-2009, 07:18 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Aye ... you can't chown/chmod NTFS .. you can modify the options
you've used to mount it, though.

How are you going about mounting those drives?
Do they have corresponding /etc/fstab lines?
What does 'mount' issued all by itself tell you about those
two mount-points?



Cheers,
Tink

Last edited by Tinkster; 12-16-2009 at 07:20 PM. Reason: [i][/i]
 
Old 12-16-2009, 07:28 PM   #6
fish_hawk
LQ Newbie
 
Registered: Jul 2009
Distribution: Karmic 9.10
Posts: 9

Original Poster
Rep: Reputation: 0
I have this drive set to mount automatically when plugged in. Here's the fstab entry which i did by UUID. The device is listed as sdd1 in GParted:

UUID=2A18071D1806E7A1 /storage/500G ntfs nls=utf8,umask=0222 0 0


I did the mount command all by itself and here's what it spit out:

root@MLB2:/storage# mount
/dev/sdb1 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw)
/dev/sdc1 on /storage/maxtor160 type ext3 (rw)
/dev/sda1 on /media/data3 type ext3 (rw)
/dev/sdb5 on /usr type ext3 (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev )
gvfs-fuse-daemon on /home/matt/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev ,user=matt)
/dev/sdd1 on /storage/500G type fuseblk (rw,nosuid,nodev,allow_other,default_per missions,blksize=4096)

I wish I knew what I did when I set up the fstab... but I just googled it and copied and pasted as best I could!
 
Old 12-16-2009, 07:33 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hmmm... was the smaller device connected on boot?

Chances are that you can get "ownership" of both if you
umount the device, comment the fstab line out, unplug it
and plug it back in ;}


Cheers,
Tink
 
Old 12-16-2009, 07:35 PM   #8
fish_hawk
LQ Newbie
 
Registered: Jul 2009
Distribution: Karmic 9.10
Posts: 9

Original Poster
Rep: Reputation: 0
Yes, I believe both devices were plugged in at boot.

Will the drive mount automatically if I comment out the fstab line?

I'll give it a shot now.

Thanks!!
 
Old 12-16-2009, 07:47 PM   #9
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: EndeavourOS
Posts: 650

Rep: Reputation: 79
try changing your fstab to
Code:
UUID=2A18071D1806E7A1 /storage/500G ntfs user,defaults 0 0
 
Old 12-16-2009, 07:50 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by fish_hawk View Post
Yes, I believe both devices were plugged in at boot.

Will the drive mount automatically if I comment out the fstab line?

I'll give it a shot now.

Thanks!!
I'd expect it to since you're a) not listing an fstab line
for the smaller one and b) gvfs took care of it, even mounting
it as yourself.


Cheers,
Tink
 
Old 12-16-2009, 08:04 PM   #11
fish_hawk
LQ Newbie
 
Registered: Jul 2009
Distribution: Karmic 9.10
Posts: 9

Original Poster
Rep: Reputation: 0
Ok. So I unmounted it and commented the fstab line. When I plugged it back in it shows up as an external drive, but nothing shows up in my mount point - which I understand is a result of commenting the fstab line.

I went ahead and changed the fstab line per bret381's recommendation. I remounted the drives and I noticed something did change - instead of

dr-xr-xr-x 1 root root 4096 2009-12-16 08:28 500G

it now reads:

drwxrwxrwx 1 root root 4096 2009-12-16 08:28 500G

was this due to the fstab change? Whatever it was, I can now move files onto this drive via the terminal. WOOHOO!!

Thanks guys - your help is much appreciated!
 
Old 12-16-2009, 08:07 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hmmm ... the original fstab line had a umask of 0222, so yes, the
suggested change did the trick in allowing anyone to write to it
w/o explicitly stating it.
 
  


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
Unable to lock the administration directory (Ubuntu) Braynid Linux - Newbie 2 12-27-2010 10:46 PM
modify owner and group names when copying on linux bash w3developing Linux - Newbie 5 08-14-2009 09:32 PM
Owner of a directory different than file owner problems Guardian-Mage Linux - Server 4 04-24-2009 10:26 AM
Unable to modify a directory listed under a samba share even if... SGlassman Linux - Server 5 09-19-2008 10:00 AM
Get the owner of a directory frayja Linux - Software 3 08-31-2007 01:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:18 PM.

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
Open Source Consulting | Domain Registration