Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The scenario is like this. Bob has a computer. It crashed. Now he only has the hdd. The hdd is in ext3 format. He go to his office and told the sys admin John to mount this hdd and put the mount point in his home directory. John used the following fstab entries.

# Bobs harddisk
/media/TAPE4/Bobs-hdd.img /home/bob/myhdd/windows ntfs ro,loop,offset=32256 0 0
/media/TAPE4/Bobs-hdd.img /home/bob/myhdd/linux ext3 ro,loop,offset=14048810496 0 0
/media/TAPE4/Bobs-hdd.img /home/bob/myhdd/extra ntfs ro,loop,offset=28015335936 0 0

Bob was happy. He could access his old extra and windows. Specially the Documents and Settings in windows was helpful for him.

But he found a problem. He is a web developer and all his websites are in linux/home/bob/public_html directory. When he tried to access that public_html directory he got permission_denied. He executed ls -lh he saw this.

drwxr-xr-x 2 john john 4.0K Nov  9  2011 Desktop
drwxr-xr-x 3 john john 4.0K Aug 12  2011 Documents
drwxr-xr-x 3 john john 4.0K Aug 21  2011 public_html

He contacted John thinking he might be mistakenly did this. But John couldn't find a way why this happend? Then one thing came into his mind file system hardly store username. They store uids. So he executed ls -ln

drwxr-xr-x 2 1000 1000     4096 Nov  9  2011 Desktop
drwxr-xr-x 3 1000 1000     4096 Aug 12  2011 Documents
drwxr-xr-x 3 1000 1000     4096 Aug 21  2011 public_html

John thinks 1000 is the first uid on a linux system. As he is the admin of the current system. He created his account first. so Johns uid was 1000. Bob also setup his private system and crated his account first. So Bobs uid was 1000 too.

So thats an expected behavior. But problem remains. How can Bob access those websites in public_html?

share|improve this question

1 Answer 1

He can run gksu nautilus (file manager as root user) and modify the file permissions from there. He could also put a umask= mount option in his fstab (see this site for an explanation).

share|improve this answer

Your Answer

 
discard

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.