Permissions - Can't change on mountpoints
Yesterday I decided that I just couldn't take gaving a 3GB HDD anymore and found a 25GB that I could erase and use. That's what I'm using now. I copied my entire old hard disk to this one and now for some reason only the root user can write to my external storage devices. I've tried using chmod and chown logged in as root, but the best I can get are rwxr-xr-x permissions. chmod 777 /mountpoint doesn't give me fullpermisions. I've treid editing the fstab/mtab files but that didn't help (I'm not very esperienced with that so I may not have done it correctly(most likely). With my 3GB HDD I could access them just fine as a non-root user.
My question: How do I change the permissions/ownership of my external storage devives? Subquestion: how should I have copied my hdd over to have maintained all original permissions? |
Hello Jinouchi,
When copying directories you always want to make sure you use the -p (--preserve) flag. This will: ( from man cp) -p same as --preserve=mode,ownership,timestamps --preserve[=ATTR_LIST] preserve the specified attributes (default: mode,ownership,time- stamps), if possible additional attributes: links, all Regarding Permissions: Here is a great links to a very simple explanation for permissions: Permissions: http://www.tuxfiles.org/linuxhelp/filepermissions.html Owner/Group: http://www.tuxfiles.org/linuxhelp/fileowner.html Please post if you are having any more problems. |
Thank you for those URLs and the -p option.
Here's what happened when I tried chown again: (I've condensed it to show only the dir I'm trying to change and replaced my username with "*****") Code:
# dir -l /media Code:
# dir -l /media I've also tried using sudo for chmod/chown, but the same thing happens. When I try to use the Nautilus GUI when logged in as root, after I check the box it un-checks it 1/2 second later. Should I just try erasing this drive and using the -p option you mentioned to re-copy my old drive onto this one? Or is there a change I can make to the fstab/mtab to fix this? I'll try to do some more research on my own too. |
Let's start this copy all over again, just to make sure you aren't having a bigger issue. Please follow these steps:
Code:
shell# mke2fs /dev/sda1 Report back on any problems. -weisso |
Thanks! Everything works fine except... it doesn't automount the swap partition. How do I do this/tell it to do so at boot?
|
ok, I got the swap mounted, but why didn't it do it at boot?
|
to auto-mount the drive you need to make an entry in your fstab file, here is an example:
Code:
# <fs> <mountpoint> <type> <opts> <dump/pass> |
All times are GMT -5. The time now is 07:58 PM. |