Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If my external drive is showing up in /home/user1/.private, would another user not be able to view this? See link for example -----> Example

user1@UB-DT2-SERVER:~$ df -lhT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext4    912G  3.9G  861G   1% /
udev      devtmpfs    3.0G  4.0K  3.0G   1% /dev
tmpfs        tmpfs    1.2G  1.4M  1.2G   1% /run
none         tmpfs    5.0M     0  5.0M   0% /run/lock
none         tmpfs    3.0G  116K  3.0G   1% /run/shm
      ecryptfs    912G  3.9G  861G   1% /home/user1
/dev/sr1       udf    615M  615M     0 100% /media/WD SmartWare
/dev/sdf1  fuseblk    466G  101M  466G   1% /media/MyPassport2

How can my external drive be mounted for all users to access?

Could it be automounted on boot?

share|improve this question
In the output you show, you seem to have two external devices both mounted under /media. Where does ~/.private come into it? – poolie Mar 9 '12 at 0:48
I assumed whatever was listed below this line /home/user1/.Private was considered private. Sorry this is all new to me. – Muhnamana Mar 9 '12 at 0:55
The reason I ask is user1 can access this but user2 can't, via a samba share. – Muhnamana Mar 9 '12 at 0:56
No problem. In the df output, there's one line (possibly wrapped) per filesystem, and the long line about /home/user1 is wrapped. Each of them is independent. – poolie Mar 9 '12 at 1:04
up vote 1 down vote accepted

There are two main possible problems:

  1. The user doesn't have Unix access to the /media/ directory. The easiest way to check this is to just do ls -ld on them and see what the permissions are, or have them log in locally and try it.

  2. They have unix access but Samba is blocking it. Easiest way to find out if this is the case is to look in the Samba logs for messages saying so, and then change it through whichever means you've set up Samba. (Editing the config files, a gui, etc.)

share|improve this answer
If the user doesn't have permission, how do I grant them access? – Muhnamana Mar 9 '12 at 1:09
Well to my best guess, since I've had this issue for weeks, is that the user doesn't have access. – Muhnamana Mar 9 '12 at 1:15
Sure, but the question is which level is blocking access. – poolie Mar 9 '12 at 1:50
My guess is the linux side since I can use the force user to gain access with user2. – Muhnamana Mar 9 '12 at 3:18

For linux permissions:

groupadd SHARE

useradd -g SHARE - username

useradd -g SHARE - otherusername

then on the dir:

chown whateverowneryouwant:SHARE DIR

chmod 764

The above will create a group, then you add your users in. Change the ownership to add the group, then set the files to rwxr-xr--. (You can change the XXX to w/e but the xXx is for group)

For Samba, though i think its linux permissions issue. it should just be: smbpasswd -a USER

They then set the samba password, then add the user on the samba.config

share|improve this answer
Does it matter that user1 is log on with the drive mounted? If I change the permissions, will user2 be able to access reguardless if it is still mounted by user1? – Muhnamana Mar 9 '12 at 2:03
If you unmount it noone will be able to access it. I dont know how your mounting so I can say if the point will stay after they log out. – Meddy Mar 9 '12 at 2:31
I just plugged in the drive and it mounts automatically for me. – Muhnamana Mar 9 '12 at 2:43
So what directory are you using? (just your /home/user1) – Meddy Mar 9 '12 at 3:14
On one of the useradd commands, it says user already exists. – Muhnamana Mar 9 '12 at 3:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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