This is an ext4 fs and I am unable to gain permissions over the directory with the postgres user:

mud@mud-i7-32gb:~$ sudo mount /dev/sdc1 /media/mud/ssd128

mud@mud-i7-32gb:~$ ls -l /media/mud/ssd128/

total 20

drwxr-xr-x 2 root root 16384 דצמ 20 22:15 lost+found

drwxr-xr-x 2 postgres postgres 4096 דצמ 21 10:45 pgdata

mud@mud-i7-32gb:~$ sudo chown postgres:postgres /media/mud/ssd128/pgdata

mud@mud-i7-32gb:~$ sudo su postgres

postgres@mud-i7-32gb:/home/mud$ ls -l /media/mud/ssd128/pgdata

ls: cannot access /media/mud/ssd128/pgdata: Permission denied

What did I do wrong?

  • 1
    What about permissions of /media/mud and /media/mud/ssd128?
    – cuongnv23
    Dec 21, 2015 at 9:12
  • is it ntfs drive? Dec 21, 2015 at 9:31
  • No the FS is ext4.
    – Avia
    Dec 27, 2015 at 20:59

2 Answers 2


Please try below method to mount disk

Find drive UUID with below command

blkid /dev/sdc1

Then Open /etc/fstab

gksu gedit /etc/fstab

Append below line at the end (replace UUID in below command with your UUID got from blkid command)

UUID=12102C02102CEB83 /media/mud/ssd128 ntfs-3g auto,users,permissions 0 0

Save and close the file and execute the mount command to mount disk.

mount -a

Now try to change permissions/owner. it should work for you


EDIT - due to unclear answer

What eventually worked was:

The /media/mud/ssd128 was under root :( - I changed it to my user which is mud instead of root

  • This answer seems a bit unclear to me.
    – kasperd
    Dec 27, 2015 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.