second hard drive wont let me create or move files?
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
its ext3 and in both mtab and fstab it is rw so that should be ok =]
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 :
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.