Take folders ownership - root owner

Asked by Paulo M.

This is my problem:
I've installed Ubuntu 8.04 in a PC with XP Pro (in a dedicated HDD), got dual boot, and so on, and everything works fine.
But, once I (we) can access others HDDs in places menu, I need to block permissions for the other users (specially my sons) for they won't access Windows folders and Windows Programs directories, and all my own documents too.
But, when I try to access those folders permissions I can see "root owner" in all of then and then I can't change those permissions, one I'm not the owner..
How can I take those folders' ownership, or get access to change their permissions access?

Thanks in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Markus Thielmann
Solved:
Last query:
Last reply:
Revision history for this message
Markus Thielmann (thielmann) said :
#1

Thanks for your question.

Unfortunatly, NTFS ACLs (Access Control Lists) are not supported by Ubuntus NTFS-driver, as far as I know. So it's an "all or nothing" decision. That means: You are able to restrict the user who is able to mount the windows harddrives at all, but you can't select different directories on your NTFS harddrive and configure them like your able to do in Ubuntu.

If restricted user access is an option for you, we'll need additional information: Please open a termin (Application->Accessories->Terminal), run the following commands and copy and paste their results to this question:

1) ls -l /media
2) ls -l /mnt
3) sudo fdisk -l (that's a little "L")

The last command will ask for your password.

Revision history for this message
Paulo M. (pauloagmartins) said :
#2

Hello again and thank you so much for your answer and concern!
Sad for reading this, but, anyway.... I think some "persuasive" talk will have to do the job....!
Here is what you ask me to:
[well... I think that's not a bad machine.... don't you??? :-)]

Thanks again!

paulo@Speeduntu:~$ ls -l /media
total 36
lrwxrwxrwx 1 root root 6 2008-04-25 16:50 cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 2008-04-25 16:50 cdrom0
drwxr-xr-x 2 root root 4096 2008-04-25 16:50 cdrom1
drwxr-xr-x 2 root root 4096 2008-04-25 16:50 cdrom2
lrwxrwxrwx 1 root root 7 2008-04-25 16:50 floppy -> floppy0
drwxr-xr-x 2 root root 4096 2008-04-25 16:50 floppy0
drwxrwxrwx 1 root root 12288 2008-04-30 00:53 Half
drwxrwxrwx 1 root root 8192 2008-04-30 00:53 XP
paulo@Speeduntu:~$ ls -l /mnt
total 0
paulo@Speeduntu:~$ sudo fdisk -l
[sudo] password for paulo:

Disk /dev/sda: 320.0 GB, 320072933376 bytes
16 heads, 63 sectors/track, 620181 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0xefa685e0

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 620178 312569680+ 7 HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000d9a6

   Device Boot Start End Blocks Id System
/dev/sdb1 1 60801 488384001 7 HPFS/NTFS

Disk /dev/sdc: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x75887588

   Device Boot Start End Blocks Id System
/dev/sdc1 1 19178 154047253+ 83 Linux
/dev/sdc2 19179 19929 6032407+ 5 Extended
/dev/sdc5 19179 19929 6032376 82 Linux swap / Solaris
paulo@Speeduntu:~$

Revision history for this message
Markus Thielmann (thielmann) said :
#3

Please try:

1) chown paulo:paulo /media/XP
2) chmod og-wr /media/XP

Please reboot and test

1) If you (logged in as "paulo") are able to mount and use /media/XP
2) If anyone else (not logged in as "paulo") is *NOT* able to use /media/XP

If that works, your problem is solved. If it does *not* work, please attach the output of "cat /etc/fstab".

Revision history for this message
Paulo M. (pauloagmartins) said :
#4

Hello, and thanks again for your comprehension and attention!

But, before I proceed with this, can you tell me, please, can I after came back to the previous state?
My concern is about some stuff and documents that the other users have in those drives - their own documents, and so on...
So, if copying their stuff for "file system" drive will not be an option [there is always the risk of loosing some school work - "it should be here, but it is not, it was moved to the other side..." (can you see...)], would be possible to undo that procedure?

Thanks again, and all my best!
(oh, by the way, can you tell me please, why my screen goes blank (seems to crashed) when I switch user or log out when other user is logged? - that blank screen is still responding by "blindly" inserting the user password (with no field for that), and the system goes on again... but it's weird anyway)

Revision history for this message
Best Markus Thielmann (thielmann) said :
#5

To change back, just run:

1) chown root:root /media/XP
2) chmod og+wr /media/XP

Please open a new answer request for your new question.

Revision history for this message
Paulo M. (pauloagmartins) said :
#6

Thanks Markus Thielmann, that solved my question.