Announcement
Collapse
No announcement yet.
Can't write to 2nd HDD - mount problem?
Collapse
This topic is closed.
X
X
-
chmod 777 the root dir. Every time I change an external drive from FAT32 to EXT4 this happens. It's stoopid but the Linux gurus have declared it normal so tuff shiat to all the users who hate it.
- Top
- Bottom
-
That doesn't work on posix filesystems like ext2-4, only on non-posix filesystem like fat or ntfs.Originally posted by oshunluvr View Postadding UID/GID settings to fstab
Posix filesystems store ownership/permissions on the filesystem itself and you can't change that from fstab.
Basically, when you create a posix filesystem it set's the default root_owner, and it will stay that way until you change that with chown (mount options are irrelevant). If you create the filesystem from the cli, you can set the root_owner option to what you like (see 'man mke2fs').
Of course you can always change the ownerships/permissions of the filesystem post creation with chmod/chown.
- Top
- Bottom
Leave a comment:
-
Other solutions are:
* leaving ownership correct (root:root) and setting the root folder to 755
* adding UID/GID settings to fstab
there's more....
All depends on what you want to do. This is Linux after all so there's lot's of choices
- Top
- Bottom
Leave a comment:
-
Yes.That's obviously what it was, but why? Is that normally/always the case for everything you mount in fstab?
Yes, but not to the exclusion of everyone else getting in, so in a way - No.Because then the whole root file system, including home would be owned by root...
As long as your user has r_x access (read and execute, or when a directory - list and access) you can navigate a access anything under the root directory regardless of ownership. The default umask is 0022, thus giving all folders and mounts drwxr_xr_x. What happens below that is up in the air.
Example: @here;
returnsCode:ls -l / |grep home
whereasdrwxr-xr-x 1 root root 48 Jan 25 16:21 home
returnsCode:ls -l /home
Thus, although I (stuart) do not own /home, I can navigate and "'read" (list) what's in it. Therefore, I can also read and navigate all those folders. Although, because it is drwxr_xr_x, I can list/navigate lisa and lily, I cannot modify or delete anything in there. A more secure system might have 0002 as a default umask, thus allowing only the owner to navigate a folder.drwxr-xr-x 1 lily lily 498 May 29 2014 lily
drwxr-xr-x 1 lisa lisa 480 Jun 20 2014 lisa
drwxr-xr-x 1 stuart stuart 1866 Feb 3 17:24 stuart
None of this explains what happened in your case - I am just offering a small rebuttal to your last comment.Last edited by oshunluvr; Feb 03, 2015, 10:56 PM.
- Top
- Bottom
Leave a comment:
-
it is ,,,,,,,,,,,,you only own /home/you and everything inside/below "you" /home is owned by root.Originally posted by bennypr0fane View PostThat's obviously what it was, but why? Is that normally/always the case for everything you mount in fstab? Because then the whole root file system, including home would be owned by root...
VINNY
- Top
- Bottom
Leave a comment:
-
That's obviously what it was, but why? Is that normally/always the case for everything you mount in fstab? Because then the whole root file system, including home would be owned by root...Originally posted by vinnywright View Postpost
you prob. do not have permission to write to itCode:ls -l /media
VINNY
- Top
- Bottom
Leave a comment:
-
post
you prob. do not have permission to write to itCode:ls -l /media
VINNY
- Top
- Bottom
Leave a comment:
-
Ok, I may have answered my own question by using that permissions tag.
Turns out /media/LinuxData was owned by ben:ben (my user), whereas /media/BackupRed was owned by root:root
I did:
sudo chown -R ben:ben /media/BackupRed
and now it's good.
What's missing is an explanation - why wasn' it the same for LinuxData?
Sure, the mount point was created with sudo, but so must anything else under the root file tree.
- Top
- Bottom
Leave a comment:
-
Can't write to 2nd HDD - mount problem?
Hi, I have two HDDs mounted in fstab only for user data - one works fine, the other is read-only for reasons I don't understand.
Here's my /etc/fstab file:
LinuxData is fine, BackupRed can't be written to, although it's mounted the same as LinuxData.Code:# <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sdb7 during installation UUID=584284b9-8257-42b6-b156-17f6f2011eca / ext4 errors=remount-ro 0 1 # swap was on /dev/sda6 during installation UUID=8f557d20-e7e6-44ac-9138-3f4fefe65dad none swap sw 0 0 # LinuxData /dev/sda2 LABEL=LinuxData /media/LinuxData ext4 defaults 0 2 # BackupRed /dev/sdb1 LABEL=BackupRed /media/BackupRed ext4 defaults 0 2
their respective lines of output for mount -l look the same too:
What I want is for both to be mounted an writable at boot.Code:/dev/sdb1 on /media/BackupRed type ext4 (rw) [BackupRed] /dev/sdc2 on /media/LinuxData type ext4 (rw) [LinuxData]
Last edited by bennypr0fane; Feb 03, 2015, 04:38 PM.
Users Viewing This Topic
Collapse
There are 0 users viewing this topic.
Leave a comment: