Accessing partitions as user

Harold Michels hmichels01 at earthlink.net
Fri Jul 6 16:11:48 MST 2007


Thank you for your response.

I had tried doing that but it will not let me either chmod or chown

Here are some of the responses I have been getting when trying this 
project. I will use the hda5 which is a FAT32 formatted partition on my 
primary hard drive. My intent for this partition was to provide a 2GB 
space to transfer Windoze files to the Linux side.

I mount this drive on bootup using this command:

/dev/hda5                /mnt/hda5               vfat    rw,auto,users   0 0

This is the listing I get from the /mnt directory:

[root at localhost mnt]# ls -alb
total 27
drwxr-xr-x  4 root root 4096 Mar 28 15:18 .
drwxr-xr-x 24 root root 4096 Jul  6 11:51 ..
drwxr-xr-x  2 root root 4096 Mar 27 12:12 floppy
drwxr-xr-x  4 root root 3072 Dec 31  1969 hda5

When I try to chmod I get this:

[root at localhost mnt]# chown  koder:koder /mnt/hda5
chown: changing ownership of `/mnt/hda5': Operation not permitted
[root at localhost mnt]# chmod -c 4775 hda5
chmod: changing permissions of `hda5': Operation not permitted

And chown gives this:

[root at localhost mnt]# chown  koder:koder /mnt/hda5
chown: changing ownership of `/mnt/hda5': Operation not permitted

Wondering if I might be working with some sort of link and not the true 
file I ran this command. I think that the number one in front of the 
hda5 indicated that it is its only link, although I do not know the 
significance of the other numbers.

[root at localhost mnt]# ls -i /mnt
7307278 floppy        1 hda5
[root at localhost mnt]# ls -i hda5
4821 Recycled  4822 TRS 2006 local BU

I mentioned the hda5 above instead of the sda1 and sda2 because I hoped 
the examples would be a little cleaner. The USB disks run through some 
sort of automount and generate icons on the Desktop that have to be 
mounted to use. Since the mount point is in /media there are a couple of 
things in the middle to muddy up the waters. I am hoping that once I get 
one sorted out the other will become clear.

If I use fstab mount the USB drives I get a  'failed ' on the list that 
displays while booting.
I get about the same thing if I do not specify vfat for hda5. They zip 
by fast enough I can't guarantee 'same'.

Matt Graham suggested that there may be an issue with passwords in 
relation to SELinux.  The  messages almost sound like  that, but I  know 
nothing about SELinux and how it interacts with the system.

He also suggested that I look at /dev/disk/by-label/ and 
/dev/disk/by-uuid. I found these folders, buy do not know what to do 
with them. The USB disk is mounting by label since the directions I 
found for formatting suggested that, but I do not understand the 
implications of having used that.

Should I fdisk the USB disks and format vfat?

Thank you for your time.

Harold

Dale Farnsworth wrote:
>> I want to be able to access my extra hard drive partitions as user so I 
>> can back things up, or whatever else I want to so. I am running a 
>> standalone workstation.
>>
>> I have a partition on my primary hard drive. I have two partitions on a 
>> USB hard drive.
>> When I connect the USB, or boot with it connected I have an icon on the 
>> Desktop for each partition. I can as user mount the drives and then 
>> access the data on as read only. I can copy data from the mounted drive.
>>
>> I can store files on the mounted drive as SuperUser and then delete 
>> them. I dismounted the drives and then as SU ran the following session:
>>
>>
>> [root at localhost ~]# mount -t ext3 -o uid=501,gid=501 /dev/sda1
>> /home/koder/Desktop/sda1
>> mount: wrong fs type, bad option, bad superblock on /dev/sda1,
>>        missing codepage or other error
>>        In some cases useful info is found in syslog - try
>>        dmesg | tail  or so
>>
>> [root at localhost ~]# dmesg | tail
>> ide: failed opcode was: 0xb0
>> hde: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
>> hde: drive_cmd: error=0x04 { DriveStatusError }
>> ide: failed opcode was: 0xb0
>> eth0: no IPv6 routers present
>> kjournald starting.  Commit interval 5 seconds
>> EXT3 FS on sda1, internal journal
>> EXT3-fs: mounted filesystem with ordered data mode.
>> SELinux: initialized (dev sda1, type ext3), uses xattr
>> EXT3-fs: Unrecognized mount option "uid=501" or missing value
>>     
>
> The ext3 fs doesn't support the uid option.  That option is needed
> on filesystems, like FAT, that don't have the notion file ownership.
>
> On ext3, if you want a user to be able to access individual files
> and directories, you have to use the normal UNIX permission system.
> To be able to create/remove files in/from a directory, make sure
> that the directory is owned by the appropriate user and that the
> user 'w' bit is set in the permissions.  Similarly set the permissions
> in order to be able to update individual files.
>
> -Dale
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20070706/79e9fc3c/attachment-0001.htm 


More information about the PLUG-discuss mailing list