Access denied to user on ext4 drive

So you attach your brand new external HDD to your Ubuntu Linux PC, you become root, you partition and format it with ext4, you mount it and it works. Then you go to the new disk as a regular user and discover that you can’t create anything in your brand new disk – “Permission denied”!

The first thing you do is, of course, you edit the /etc/fstab. You say that you want your disk to be user mountable, you wrestle it his way and that and still your users can not write anything to your new disk.

Well, the problem is very simple – there is no problem! (Well… the problem is between the keyboard and the chair).

The disk was formatted by root, so the file system on the new disk  is owned by root.

The simplest way to test this is – create a directory and make it owned by a user. The user will be able to do whatever he likes in this new directory of his.

It’s the file permissions issue, not the disk mount options issue.

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s