second hard drive wont let me create or move files?
hey I've recently mounted my second hard drive onto sabayon linux, however when I try to move files on to my second hard drive I am told that I do not have permission to do this. how fix I change this, so that I can freely move files to and from the hard drive without running as root?
|
What filesystem is the disk formatted as? For fat/vfat it needs to be mounted with additional options to allow users to access it:
mount -t vfat ... -o users,umask=002 If it's ext2/3 you need to use chmod or chown on individual files and directories. I'm not sure, but I think ntfs options are handled the same as vfat. |
Also, inspect /etc/fstab or /etc/mtab to see if the partition is mounted read-only (ro) or read-write (rw). If it is read only, you will get the 'permission denied' message. You will have to remount the partition as rw in order to write to the partition.
|
Quote:
you mean every file I take or use from it will have to be done through the CLI? I checked the properties and it says the owner of the drive is root, how do I change that to user? just in case I'm missing something here is my mtab : Code:
/dev/mapper/VolGroup00-LogVol00 / ext3 rw,user_xattr 0 0 Code:
/dev/VolGroup00/LogVol00 / ext3 defaults,user_xattr 1 1 |
ext preserves the ownership and permissions of every directory and file. If the owner of a file is, say root:root with permissions of rwxr-xr-x, only root can save changes. Then the file next to it could be root:root with rwxrwxrwx (not likely but possible). So, if every file on that disk is owned by root:root, only root can change the ownership, and if the permissions are restrictive like rwx-r--r-- only root can save changes to the file.
You could chown -R root:users and then chmod -R 775 on the mount point, and if you want you can use your user's name instead of root. Or you can chmod -R 777 on the mount point to give everyone full access. I would use the chown option for security reasons. Don't forget the -R and make sure the disk is mounted first. And be extra careful that you execute it on the correct target. You don't want to chown the entire / or chmod 777 your entire /etc directory. |
If your second disk has another Linux OS, the most convenient solution is to use the same UID and GID on both systems. If not, simply use chmod -R and chgrp -R as explained elsewhere in this thread.
|
dracolich is correct, however ensure the drive unmounted before making the permission changes on the mount point so that whomever you would like to have right permissions have them. Then remount the drive.
|
All times are GMT -5. The time now is 08:33 AM. |