You are not logged in.

#1 2008-04-14 07:22:38

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,199

Mounting an extra drive within the user directory [SOLVED]

I've got an extra drive which I want to be always mounted somewhere within my user directory. I put a new line in my /etc/fstab, but my permissions seem to be wrong: "access denied", no mounting for me.

/etc/fstab:

# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0


/dev/cdrom /mnt/cdrom   iso9660   ro,user,noauto,unhide,iocharset=utf8   0      0
/dev/dvd /mnt/dvd   udf   ro,user,noauto,unhide,iocharset=utf8   0      0
/dev/fd0 /mnt/fd0   vfat   user,noauto   0      0
/dev/sda1 /home/alexey/mnt/a ext3 defaults 0 1   ##### the new line #####
/dev/sdb1 swap swap defaults 0 0
/dev/sdb2 / ext3 defaults 0 1
/dev/sdb3 /home ext3 defaults 0 1

Seems to be an exceptionally dumb question, but I still don't know how to go about it. I want to read and write to the new disk with my user permissions.

Last edited by Llama (2008-04-15 09:38:14)

Offline

#2 2008-04-14 08:07:52

kendosperling
Member
From: Dresden
Registered: 2007-08-28
Posts: 49

Re: Mounting an extra drive within the user directory [SOLVED]

i think you have to put ',users' after defaults to get it working. The line schould look like
/dev/sda1 /home/alexey/mnt/a ext3 defaults,users 0 1   ##### the new line #####
I don't know if it is necessary but in my oppinion you should place the line at the end of /etc/fstab

Offline

#3 2008-04-14 08:32:01

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,199

Re: Mounting an extra drive within the user directory [SOLVED]

Thank you, kendosperling! It did help. One more question smile : why the new disk doesn't get mounted right away, automatically?

Offline

#4 2008-04-14 08:41:16

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,199

Re: Mounting an extra drive within the user directory [SOLVED]

I want to read and write to the new disk with my user permissions.

Still "access denied" when I try to move a directory within the new disk

Offline

#5 2008-04-14 08:57:17

kendosperling
Member
From: Dresden
Registered: 2007-08-28
Posts: 49

Re: Mounting an extra drive within the user directory [SOLVED]

To give readwrite access explicit add rw and to mount it at boot add auto :
/dev/sda1 /home/alexey/mnt/a ext3 auto,rw,defaults,users 0 1   ##### the new line #####

Offline

#6 2008-04-14 10:33:04

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,199

Re: Mounting an extra drive within the user directory [SOLVED]

Unfortunately, these changes make no difference.

Funny: I studied the ownership/permissions via KDE:System:(drive)Properties - they appear to be exactly the same for either sda1 or sdb3. Where's the catch smile ?

Last edited by Llama (2008-04-14 11:33:11)

Offline

#7 2008-04-14 13:11:08

kendosperling
Member
From: Dresden
Registered: 2007-08-28
Posts: 49

Re: Mounting an extra drive within the user directory [SOLVED]

sorry but i don't know what to try furthermore sad

Offline

#8 2008-04-14 14:13:30

ilovefridge
Member
Registered: 2007-04-18
Posts: 22

Re: Mounting an extra drive within the user directory [SOLVED]

I use this and it works fine:

/dev/sda5 /home/me/Media ntfs-3g auto,users,user,noexec,nosuid,nogid    0    0

so try this:

/dev/sda1 /home/alexey/mnt/a ext3 auto,users,user,noexec,nosuid,nogid    0    0

Offline

#9 2008-04-14 15:28:42

dmartins
Member
Registered: 2006-09-23
Posts: 316

Re: Mounting an extra drive within the user directory [SOLVED]

The problem is not with your fstab! ilovefridge's suggestion is not ideal because noexec will stop you from running programs off the partition, which you may want to do at some point. It also won't fix your permissions error smile

You need to give your user ownership and read/write/execute permissions on the folder 'a' once you've mounted the partition.

As root:

# cd /home/alexey/mnt
# mount /dev/sda1 a
# chown alexey a
# chmod u+rwx a

The simplest of fstab lines should work (including automatically mounting):

/dev/sda1    /home/alexey/mnt/a       ext3      defaults       0  0

Depending on your desktop environment, you may not get an icon on your desktop showing the partition because you've added it in fstab. However, if you type 'mount' in a terminal it should show up as being mounted after booting.

Last edited by dmartins (2008-04-14 15:32:17)


-- Dan

Offline

#10 2008-04-15 03:10:11

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,199

Re: Mounting an extra drive within the user directory [SOLVED]

Thank you, dmartins! Now it mounts on startup, and I am the owner of /home/alexey/mnt/a, but everything else underneath still happens to be owned by root, according to ls -l. I still can't handle the goods with my user permissions. What am I to do?

/dev/cdrom /mnt/cdrom   iso9660   ro,user,noauto,unhide,iocharset=utf8   0      0
/dev/dvd /mnt/dvd   udf   ro,user,noauto,unhide,iocharset=utf8   0      0
/dev/fd0 /mnt/fd0   vfat   user,noauto   0      0
/dev/sdb1 swap swap defaults 0 0
/dev/sdb2 / ext3 defaults 0 1
/dev/sdb3 /home ext3 defaults 0 1
/dev/sda1 /home/alexey/mnt/a ext3 defaults 0 1

Offline

#11 2008-04-15 09:37:25

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,199

Re: Mounting an extra drive within the user directory [SOLVED]

# chown -R alexey:users a

Is the answer smile

Offline

Board footer

Powered by FluxBB