You are not logged in.
Hi, I have a 1tb ext4 drive in my system (not root).
My fstab
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda2
UUID=656215c7-0d43-4757-a0a1-afc460624bb0 / ext4 rw,relatime,data=ordered 0 1
/dev/disk/by-uuid/F67497A0749761E3 /disks/documents auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/57AD34D061BBE64F /disks/games auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/bc488603-b79b-4c66-8ef4-22ef4fcc60ec /disks/Games auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/65b01cd0-0a5c-4264-a5f8-d2bd2521e393 /disks/Data auto nosuid,nodev,nofail,x-gvfs-show 0 0The correct lines are the last 2, the two first ones are old. The /disks/Data is the drive I am talking about, /dev/sdb1
Anyways, I can't seem to be able to write to the the drive unless I am root. The mount point for the drive in question has the owner set to me, and the permissions are set to 755, same as my games drive that works perfectly fine.
I've tried everything, my last resort is posting here.
If any additional info is needed, I will post it asap. I don't mind wiping the drive because it's already empty.
Last edited by andrep (2015-12-15 20:49:01)
Offline
What filesystem?
Offline
An internal hard disk formatted in ext4
Last edited by andrep (2015-12-15 03:24:52)
Offline
And after you mount it, what are the permissions of the ext4 filesystem?
Offline
The root of the mountpoint is 777 with me as an owner, and the mountpoint is 755 with me as an owner (same as other disk that works fine).
/dev/sdb1 is owned by root, with 660
sdc1 (the drive that works) has the same permissions.
Offline
Is there any other info you need?
Offline
What is the output of mount ?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
What are the permissions of the drive's filesystem? Even if the owner:group of the mountpoint is your user, if the files on the drive are also not owned by the same UID then you should not expect to be able to write as your user.
How about an `echo $UID` and a `stat /path/to/file` to a file you cannot modify.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Ok, somehow I am able to write again. I have not remounted the drive, or did anything special. I am going to keep these outputs for the future incase anyone needs them for some reason. I am marking this as solved, but there isn't a solution.
What is the output of mount ?
Output of mount is
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=4059332k,nr_inodes=1014833,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda2 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=33,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=812412k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sdc1 on /disks/Games type ext4 (rw,nosuid,nodev,relatime,data=ordered)
gvfsd-fuse on /root/.gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
/dev/sdb1 on /disks/Data type ext4 (rw,relatime,data=ordered)What are the permissions of the drive's filesystem? Even if the owner:group of the mountpoint is your user, if the files on the drive are also not owned by the same UID then you should not expect to be able to write as your user.
How about an `echo $UID` and a `stat /path/to/file` to a file you cannot modify.
UID is 1000, output of stat is
File: ‘/disks/Data’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 811h/2065d Inode: 2 Links: 6
Access: (0755/drwxr-xr-x) Uid: ( 1000/ andre) Gid: ( 1000/ andre)
Access: 2015-12-15 15:46:01.661233010 -0500
Modify: 2015-12-15 15:46:13.527817646 -0500
Change: 2015-12-15 15:46:13.527817646 -0500
Birth: -Offline
If it's working, then it doesn't matter, but the stat output I was interested in was on something on that device, not on the mountpoint. My concern was - again - that you might own the mountpoint, but if the ownership of files/directories on the device was different, then you still would not be able to write.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline