Formatting hard drive with ext3/ext4 while getting full rwx permissions
Hey all,
I couldn't find a similar thread about this topic, maybe didn't search long enough, so forgive me for cross-posting and if this is the case, post a relevant link. How can I format a USB hard drive to ext3/ext4 or whatever file format and have full permission to read, write and execute all files afterwards? When using the command line (as ROOT of course) mkfs.ext3 /dev/sdb??? restricts the rights to ROOT as does the procedure gParted. The man mkfs did not help much. Configuring the fstab- file is a bit of a hassle, so it would be nice, if there was an option to set the permissions "correctly" right from the beginning. Setting Ubuntu (I'm using Ubuntu 9.10) up, so that it mounts USB devices not as ROOT as default but giving all users all permissions seems to be really complicated, as a guy from my local LUG told me. Thanks for your help |
The permissions are set at mount time. The mount man page has a huge amount of information. How are you mounting the partition? What is the entry in your fstab?
Evo2. |
Try chown on the mount point. Change the owner to you.
Say the disk is mounted at /media/disk and your username is pasbern. Code:
$ sudo chown pasbern.pasbern /media/disk |
Use chmod and/or chown.
|
Hi,
Welcome to LQ! Quote:
Quote:
Just a few links to aid you to understand; Linux Documentation Project Rute Tutorial & Exposition Linux Command Guide Utimate Linux Newbie Guide LinuxSelfHelp Getting Started with Linux Advanced Bash-Scripting Guide :hattip: The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links! |
Thanks a lot for your quick answers. The command chown seems to work even on remount. Couldn't get to work with a vfat file system earlier, since the file system was corrupted, so at that time I figured the thing is not so useful after all. I will have a closer look at the man pages of chown & chmod.
By the way, is there an easy way to configure Ubuntu, so that USB-devices get mounted with all users having all permissions? |
HI,
Quote:
:hattip: |
Quote:
Do you mean setting the mount options for 'vfat' filesystem with rwx permission for all users, by "not a wise thing"? Well, I have formatted the hard drive with ntfs, so it can still be used with my Windows partition. Thinking about installing an ext3-plugin for Windows. |
Hi,
Mounting of the filesystem permissions is different than permissions of the files on a vfat filesystem. :hattip: |
You seem to be confused about the way linux handles various filesystems.
For starters, FAT32 and FAT16 don't have a native permission structure per se so linux grafts one on it in order to make vfat compatible with linux. With vfat, you change access permissions by changing the "umask" option in the fstab entry for the vfat partition. You can't use chmod or chown on a vfat filesystem since it has no native permission structure, only an emaulated one created by the linux kernel for compatibility reasons. If you try to chmod or chown a vfat filesystem, even as root you will get a permission denied error message. Native linux filesystems like ext3, ext4, reiserfs, xfs, etc, have native support for linux file permissions built into the filesystem. You change the permissions on a partition with a linux filesystem by running chmod or chown on the partition mount point while the partition is mounted. It will not work if you run those commands while the partition is not mounted. For example, if you wnat to give everyone rwx permissions on an external hard drive, you would mount the external hard drive partition and run as root: # chmod -R 777 <external hard drive mount point> |
@ kilgoretrout
You started a real enlightenment process regarding my understanding of file systems. I knew that FAT doesn't have a permission structure and that with Linux it gets a little more complicated than with Windows. Now, I understand why I had problems with vfat. Well, everything is working by now (for the moment at least) and I will have a look into the umask options. By the way I once did # chmod a+rwx -R /etc which wasn't such a good thing to do after all (wanted to get execute permission on a file for installing an running a package). So I after total reinstall of Ubuntu I tried to keep a bit off that command. To all members, thanx a lot your helpful and friendly advice. |
All times are GMT -5. The time now is 07:47 AM. |