"Normal" usb hard disks have windowz filesystems I think, when they are mounted they are write able as user. If I format a usb external hard disk with ext4 it will not be write able as user.
I would like my external ext4 disk to be user write able automatic on my computers, how?
man chmod
man chown
Quote from: towo on 2015/02/12, 10:21:28
man chmod
man chown
Yes, but if I understand right, this commands can make my hard disk write able as user when it's mounted, but I want it to work automatic as it does with the external disks with windowz filesystems.
You did not say that clear enough. What DE are you using?
greetz
devil
XFCE
Quotebut I want it to work automatic as it does with the external disks with windowz filesystems.
This will never work since linux-fs' using linux-rights!
There is no way to give the needed rights with magical mount-options!
Quote from: towo on 2015/02/12, 12:54:19
Quotebut I want it to work automatic as it does with the external disks with windowz filesystems.
This will never work since linux-fs' using linux-rights!
There is no way to give the needed rights with magical mount-options!
Serious question: Why not? There is somewhere a auto-mount logic that executes a mount if a usb device is plugged in.
There are mount options and fstab options to make a single device writeable for all users so why shouldn't be there a way to add such an option to default mount options for generic new devices
Here is such one solution with udev (untested, only as example that there are/should be ways)
http://unix.stackexchange.com/questions/111685/usb-drive-permissions-when-automounting/124060#124060 (http://unix.stackexchange.com/questions/111685/usb-drive-permissions-when-automounting/124060#124060)
edit: After reading many boards i don't see a way to reach this wis udisks (used by XFCE and most other DEs). So a manual chmod/chuser stays as annoying workaround.
There are mount options and fstab options to make a single device writeable for all users so why
No, there isn't because such mount options are only available on non linux fs.
The great advantage that the Universal Serial Bus brought to computer users is hot-pluggability. Methods that I have tried to "permanently" mount a USB device have always led to regrets. For example, you THINK you always want it connected, then one day you need to use it somewhere else, and if you put the "auto" option on a mount command in /etc/fstab, your computer might not boot at all.
I recommend that (as root) make a directory on the USB drive and set the permissions for all users to have access to it. Or make a folder for each user on it. But leave the device itself a root-owned device.
Thank you Towo for explaining.
Quote from: dibl on 2015/02/12, 14:43:02
.................................
I recommend that (as root) make a directory on the USB drive and set the permissions for all users to have access to it. Or make a folder for each user on it. But leave the device itself a root-owned device.
@ dibl, that will work good enough for me, thanks
Quote from: towo on 2015/02/12, 14:39:00
There are mount options and fstab options to make a single device writeable for all users so why
No, there isn't because such mount options are only available on non linux fs.
I guess the only way to achieve this would be mounting ext3/4 via fuse. Some time ago I tried to set-up a partition which would be R/W for a group no matter how things got copied/moved in there (tried with directory-setuid bit, ACLs, you-name-it). In the end the only "reliable" option was FAT32. If fuse-ext4 exists it might provide a solution.
I tried the solution that dibl suggested, it's working very well and is so simple that I feel stupid not finding it out myself. I (as root) made a directory named USERS on the usb-disk and made it write and read able for everybody. No need to hassle around with some complicated (and troublesome) solutions for my needs.
One reason that I didn't found out that solution myself is that I'm to bad in understanding how file-rights work. The directory is marked as read and write able for everybody and that will now be so on every linux system I use the usb-disk on, I had some "weird" thought that the file-rights was connected to one computer or installation, but it's not.
One question, if I do a directory on the usb-disk with only rights for a specific user, will it work for a user with the same name on another computer or installation then?
Hello dibl,
Quote from: dibl on 2015/02/12, 14:43:02
and if you put the "auto" option on a mount command in /etc/fstab, your computer might not boot at all
That's right. systemd.mount assumes that boot should fail if mounting doesn't succeed.
But luckily with the mount option "nofail" you can mark such additional mounts as not essential.
greetings
musca
hello vilde,
the name of your user is only displayed for humans.
Internally the user is referenced by his UID which is assigned in /etc/passwd.
On other systems your files will belong to the user with the same UID.
You may want to try
id "$USER"
greetings
musca
Quote from: musca on 2015/02/12, 19:30:00
But luckily with the mount option "nofail" you can mark such additional mounts as not essential.
Thanks -- I did not even know about that option. Good to learn new things here on the forum. :)
I think this topic is a very good example how it can be on a good forum.
I had a question, towo gave the limitations , the frames, then dibl came with an easy solution for me and finally musca answered my second question and gave dibl and me (and probably others) a for us new option for mounting disks in fstab.
That's really nice and quick help and good exchange of information and usable knowledge.
Thanks :)
Quote from: vilde on 2015/02/13, 18:54:05
I think this topic is a very good example how it can be on a good forum.
I agree.
OT: "All of us know more than any of us."
or "Alle wir kennen mehr als irgendwelche von uns."
8)