LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 11-11-2012, 06:02 PM   #1
r3g
Member
 
Registered: Jan 2006
Distribution: Ubuntu 10.04 Netbook Remix
Posts: 41

Rep: Reputation: 17
Gain access to files on removable ext3 drive


Hi,

I have a Seagate 320Gb external hard drive formatted as ext3 hooked up to my NSLU2 NAS.

Recently the NAS has been reporting low disk space on the drive, but now it's refusing access to the drive. None of the valid user accounts can access any files. They can browse the directories but if you try to even open a file you get permission denied.

I'm thinking that the issue could be to do with the low disk space and the way that the NSLU2 works, so I thought I'd just hook up the drive to another computer and try to delete some files and repair the permissions issue.

I decided to use my Raspberry Pi for this as it's conveniently situated next to the NSLU2, so I plugged the external drive into it and as I expected, I can see the files, but can't access or delete them because they were created on another system.

So I tried "chown" on one of the folders on the drive, but I got permission denied, so then I tried "chattr -i" on it and got the same.

Is there an easy way to take ownership of these files so that I can sort them out, or is the problem likely to be due to some sort of corruption on the drive? if so, is it repairable?

Thanks,

Richard
 
Old 11-11-2012, 06:20 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 1,773

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
"permission denied" most likely means the drive is mounted read-only. What does mount say? Any error messages for the drive?
 
Old 11-12-2012, 01:55 AM   #3
r3g
Member
 
Registered: Jan 2006
Distribution: Ubuntu 10.04 Netbook Remix
Posts: 41

Original Poster
Rep: Reputation: 17
The drive is auto mounted when plugged in and /etc/mtab says;

/dev/sda1 /media/a44d2b4b-1794-4537-b818-51b681027a59 ext3 rw,nosuid,nodev,rela$

So I'm assuming that rw means read/write?
 
Old 11-12-2012, 02:00 AM   #4
r3g
Member
 
Registered: Jan 2006
Distribution: Ubuntu 10.04 Netbook Remix
Posts: 41

Original Poster
Rep: Reputation: 17
Sorry, that line from mtab was truncated, this is the full line;

/dev/sda1 /media/a44d2b4b-1794-4537-b818-51b681027a59 ext3 rw,nosuid,nodev,relatime,user_xattr,acl,barrier=1,nodelalloc,data=ordered 0 0
 
Old 11-12-2012, 11:09 PM   #5
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 1,773

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
/etc/mtab has the options that were used when the mount operation was performed. The mount command reads /proc/mounts which will give you the actual states of the filesystems.
 
Old 11-13-2012, 02:04 AM   #6
r3g
Member
 
Registered: Jan 2006
Distribution: Ubuntu 10.04 Netbook Remix
Posts: 41

Original Poster
Rep: Reputation: 17
Thanks I didn't know that.

Looking in /proc/mounts I see;

/dev/sda1 /media/a44d2b4b-1794-4537-b818-51b681027a59 ext3 rw,nosuid,nodev,relatime,user_xattr,acl,barrier=1,nodelalloc,data=ordered 0 0

It's the same as from /etc/mtab, so if it was mounted as rw but is ignoring that command then is it likely to be disk corruption causing the problem?
 
Old 11-13-2012, 04:59 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Or it could be ACLs. The getfacl command can be used to display ACLs.
 
Old 11-13-2012, 05:26 PM   #8
r3g
Member
 
Registered: Jan 2006
Distribution: Ubuntu 10.04 Netbook Remix
Posts: 41

Original Poster
Rep: Reputation: 17
Unfortunately getfacl / setfacl commands do not exist in the Raspbian distro that I'm running here.
 
  


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
mounting SATA drive to gain access to locked folders Ben0341 Linux - Newbie 2 01-27-2009 01:19 PM
How do I move files from a ntfs drive to a ext3 drive? adrian30020 Linux - Newbie 6 11-15-2007 03:27 PM
Moving files from NTFS drive to a EXT3 drive?? webshark Slackware 10 05-28-2006 04:02 PM
access denied on /mnt/removable with an external USB drive dasch Mandriva 4 09-02-2005 06:30 PM
How to gain **write-access** to windows xp files? sairam9 Linux - Newbie 3 07-14-2005 10:09 AM


All times are GMT -5. The time now is 07:31 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration