LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   External Hard Drive is mounted but I can't access - pls help! (newbee) (https://www.linuxquestions.org/questions/linux-hardware-18/external-hard-drive-is-mounted-but-i-cant-access-pls-help-newbee-545193/)

esspy4 04-11-2007 01:27 PM

External Hard Drive is mounted but I can't access - pls help! (newbee)
 
I just purchased a new ext hard drive "Western Digital Essential Edition 250 GB USB2". It came preformated in FAT32 and had some software on it. I used gparted to format it as ext3 and then mounted it in /media/usbdisk It shows as /dev/sda1 in gparted.

I used disklabeltype msdos and have no flags set.
When i open the drive there's a file folder there "lost+found" with a small red box with an "x" in it. When i try to open it it says "You do not have the permissions necessary to view the contents of "lost+found"."

Essentially, it's there but I can't store anything on it...

Can someone help a newbee please?

stress_junkie 04-11-2007 01:31 PM

The lost+found directory is for system use. It is used on ext2 and ext3 file systems. When the disk is checked by using fsck the lost file fragments are stored in the lost+found directory.

Try to either create a file or a directory at the same level as the lost+found directory. If you don't have permission for that then post back to this thread.

:)

lazlow 04-11-2007 01:33 PM

The lost and found is normal. When you try to copy a file to the drive what happens?

esspy4 04-11-2007 02:54 PM

I can't copy a file to it or create a folder in it. Also I noticed that the "permissions" tab in the properties box for it, the "owner" and "group" are set as "root".....

Road_map 04-11-2007 04:15 PM

Did you add an entry in /etc/fstab?

lazlow 04-11-2007 04:25 PM

What destro are you running? Are you trying to copy the files as root? If the permissions are set as root only then only root can do anything.

esspy4 04-11-2007 04:46 PM

What's a "destro" ?

Here's what I added to /etc/fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/hda2
UUID=631dde64-165c-4cae-a7f8-0829f199e5f1 / ext3 defaults,errors=remount-ro 0 1
# /dev/hda5
UUID=b8cb67f0-ea6f-4e4c-9be5-26c894e369b3 none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/ /media/floppy0 auto rw,user,noauto 0 0
/dev/hda1 /media/windows vfat rw
/dev/sdb1 /media/usbdisk ext3 rw

esspy4 04-11-2007 05:27 PM

The problem really seems to be that the permissions for useage of the drive are for some reason set to root -how did that happen? and how can I change it to acess the drive?

lazlow 04-11-2007 06:02 PM

What version of linux are you running? Fedora, ubuntu, yellow dog? As well as version of that type ie: Fedora core 6, suse 10.1,etc.

Destro was a typo for distro as in distribution.

esspy4 04-11-2007 06:15 PM

I'm using ubuntu 6.10

stress_junkie 04-11-2007 06:25 PM

Quote:

Originally Posted by esspy4
What's a "destro" ?

A destro is what someone uses when they can't spell distro a.k.a. distribution. (Red Hat, SuSE, Debian, Slackware, et. al.) :)
Quote:

Originally Posted by esspy4
Here's what I added to /etc/fstab
/dev/sdb1 /media/usbdisk ext3 rw

This is what I would do.

Log on as root and change the line in your /etc/fstab to the following:
Code:

/dev/sdb1    /media/usbdisk  ext3  defaults  0  0
Then mount the partition and change the owner and permissions on the disk as follows.
Code:

mount /dev/sdb1 /media/usbdisk
chown root:users /media/usbdisk
chmod 777 /media/usbdisk

Then normal users can create, edit, and delete files and directories on the partition. If you want a bit more security you can change the last 7 to a zero in the chmod command where chmod 777 changes to chmod 770.

Let us know if you continue to have problems. :)

esspy4 04-11-2007 07:13 PM

Wow!! thanks Stress Junkie...that works. I've been working on this all day and was becoming quite frustrated. What beer do you drink, I'll send you a cold one :)
Thanks again you're my hero!!

If you don't mind could you tell me what the extra security would be by changing the the mode settings that you mention (I used the 777 settings.

Thanks you've made my day.

stress_junkie 04-11-2007 08:03 PM

Quote:

Originally Posted by esspy4
If you don't mind could you tell me what the extra security would be by changing the the mode settings that you mention (I used the 777 settings.

I'm glad that I could help. That's the way I set up all of my mount points.

The security has to do with what the 777 means. You probably already know that the first number controls the access by user/owner of the file or directory, the seond number controls the access by the group that owns the file or directory, and the third number controls access by anyone that does not fit into the first two categories. Since we made the directory owned by the users group and all of your normal user accounts will belong to this group then this is how we allowed access to this directory by normal users.

Accounts that don't belong to either root or users are things like the nobody account, ftp account, mail account, and other accounts for various functions. The nobody account is usually used to run the updatedb utility that creates the database for the locate utility. If you allow accounts that are not root and are not users to read the directory then the files in that partition will be listed in the database used by the locate utility. That may or may not be a problem. Business computers with several user accounts would not allow files owned by one user to be seen by other users. The locate utility would show any user any file that the nobody account can see. So there is a potential for a privacy leak by means of the locate utility.

Actually, even if you want the files in that partition to be visible to accounts that are not root and are not users you probably still don't want those accounts to create files so you should restrict that third number to read + execute for directories and read for files. That would be a number 5 for directories and 4 for files.
Code:

chmod 775 /media/usbdisk
It's just an idea. :)

fedorafreak62 07-12-2007 04:51 AM

I recently installed fedora 7 from a live cd. I have a cdrom & a cd writer on my system. My system recognises both my cd drives, but it cant read the cdrom. It reads the cd writer. How can I make my computer read the CDROM? my etc/ftab is as follows

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0


All times are GMT -5. The time now is 04:41 PM.