Re: New hard drive mounting rights problems ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexander Dalloz wrote:

> Am Sa, den 24.07.2004 schrieb Marian POPESCU um 19:32:
> 
>> Disk /dev/hdf
>>    Device Boot      Start         End      Blocks   Id  System
>> /dev/hdf1   *           1        1306    10490413+  83  Linux
>> /dev/hdf2            1307        2434     9060660    5  Extended
>> /dev/hdf5            1307        2434     9060628+  83  Linux
> 
>> $ls -l /mnt/
> 
>> drwxrwxrwx   2 root   root        4096 Jul 24 17:31 lin1
>> drwxrwxrwx   2 root   root        4096 Jul 24 17:31 lin2
> 
>> Now, I want to mount hdf1 and hdf5 onto /mnt/lin1 and /mnt/lin2 so that
>> an ordinary user can modify (create, change, delete) the contents of the
>> two partitions.
>> 
>> My fstab looks like
>> [...]
>> /dev/hdf1       /mnt/lin1       ext3    defaults,rw,exec,suid,user      0
>> 0
>> /dev/hdf5       /mnt/lin2       ext3    defaults,rw,exec,suid,user      0
>> 0
>> [...]
> 
> Only use defaults as the mount option. Both are ext3 partitions -
> concluded from your own fstab entries - and so you must handle
> permissions _inside_ the filesystem, means by giving the directories and
> files the proper permissions. As an example, giving that /hdf1 is
> formatted but empty. Then create on it after you mounted it a directory
> called testdir with "chmod 777" and every user has full permissions in
> it.
> 
>> When I do
>> $mount /mnt/lin1
>> $ls -l /mnt/
>> drwxr-xr-x   2 root   root        4096 Jul 18 03:10 cdrom
>> drwxr-xr-x   2 root   root        4096 Jul 18 03:10 cdrom1
>> drwxr-xr-x   2 root   root        4096 Jul 18 03:10 floppy
>> drwxr-xr-x   4 root   root        4096 Jul 24 18:37 lin1
>> drwxrwxrwx   2 root   root        4096 Jul 24 17:31 lin2
>> 
>> Which means that, as ordinary user, I cannot create, change or delete
>> files on /mnt/lin1.
> 
> No, it does not mean that.
> Run "ls -ld /home" and you'll quickly see that you are wrong. I think
> you will have to read some stuff about *NIX permission structures.
> 
>> Marian
> 
> Alexander
> 
> 
Thanks for your reply!
So, I was looking for my glasses which were on my nose ...

There is one thing, though, that a normal user cannot do:
create a directory on lin1! Am I wrong?

[marian@mypc /]$ mkdir /mnt/lin1/mydir
mkdir: cannot create directory `/mnt/lin1/mydir': Permission denied

Can I do something about it?

Marian




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux