Other Help Topics :: permisions



hello,

i did sudo su.. then i changed the perm of hda1 --> chmod a-x , a-r,  a-w. i checkd using ls -l and the perms where changed.. i tried to mound the hd using mount /mnt/hda1 and it sill mounted and i was able to read and write, although i have set the perm for all users including root.. i loged out of root to dsl@box and still i was able to do the same thing..

is this a bug or im doing somthing wrong here ??

thanks

What was the exact command you used?
Typically chmod is done only to files, not to drives.  If you did "chmod <mode> /dev/hda1" you are changing only the device file.  If you do "chmod <mode> /mnt/hda1" it changes only the mount point.

If you want to make a drive read-only, try editing /etc/fstab....add "ro" to the options of hda1

Also, permissions do not apply to root.

ok .. i cant change the fstab file , as it is part of a read only file system , even if i use the toram option.

so how can i do that using the command line.

thanks

It depends on the filesystem on hda1.  For fat32 it would be something like this:
sudo mount -t vfat -r /dev/hda1 /mnt/hda1

http://www.die.net/doc/linux/man/man8/mount.8.html


original here.