Home   Help Search Calendar Login Register  
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]   Go Down
  Print  
Author Topic: Can chown be used to change the ownership of Drives?  (Read 990 times)
0 Members and 1 Guest are viewing this topic.
HappyPaul
Posting Members
Geek
*
Offline Offline

Posts: 290


« on: November 20, 2009, 01:30:55 PM »

Hi:

I know you can change the ownership of files and directories using the chown command, however, I'm wondering if it can be used to change the ownership of whole volumes or partitions?  Does it matter that the two drives in question are formatted NTFS?

Paul
Report to moderator   Logged

Better a Short Life of Self-Indulgence than a Long Life of Self-Denial.
admin
El Presidente
Administrator
Master
*****
Offline Offline

Posts: 1419



WWW
« Reply #1 on: November 21, 2009, 06:35:30 AM »

I don't think whole drives or partitions have permissions, only files and directories. If you mount a drive, then you need to do that in a folder with the appropriate permissions. And NTFS has its own permission system distinct from Linux. I think that NTFS files show up with root ownership though unless you specify you want to see it otherwise. But I'm going by memory here.
Report to moderator   Logged

"Voting is one of the few things where boycotting in protest clearly makes the problem worse rather than better." - Jane Auer
admin
El Presidente
Administrator
Master
*****
Offline Offline

Posts: 1419



WWW
« Reply #2 on: November 21, 2009, 06:49:38 AM »

Thinking about your question more. Do you want to change the permissions of all the files and folders on a Linux partition or drive? Or a Windows drive? A Windows drive, you can't do it because it doesn't have Linux permissions, it doesn't speak them. That's where umask comes in. So you can mount it in such a way that all the users can access the files. For that,

http://ubuntuguide.org/wiki/Dapper#Windows

If you're trying to quickly change the permissions of an entire Linux drive (don't do this on your normal system directories or there will be trouble), you need to use chown with the -R switch (-R for recursive) and do it from the root (/) but I've never seen a reason to use this command from the top of the tree so I'd be very very careful if I were you. Meaning, backup anything important or don't do it.

Report to moderator   Logged

"Voting is one of the few things where boycotting in protest clearly makes the problem worse rather than better." - Jane Auer
HappyPaul
Posting Members
Geek
*
Offline Offline

Posts: 290


« Reply #3 on: November 21, 2009, 03:46:39 PM »

I have one ext3 partition that I was able to successfully chown from root to user, however the NTFS partitions simply don't respond.

I was mostly just trying to use my new CLI skills to do this.  I want to share the NTFS partitions on the Network.  I'll just sudo nautilus and share them graphically.  Thanks for the advice.

Paul
Report to moderator   Logged

Better a Short Life of Self-Indulgence than a Long Life of Self-Denial.
admin
El Presidente
Administrator
Master
*****
Offline Offline

Posts: 1419



WWW
« Reply #4 on: November 21, 2009, 09:57:25 PM »

You can do it the CLI, you just need to use the umask option in mounting the ntfs partition. Once you have it the way you like it, you can put it in the /etc/fstab file so it's the same way everytime you boot.
Report to moderator   Logged

"Voting is one of the few things where boycotting in protest clearly makes the problem worse rather than better." - Jane Auer
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
DK THEME: deruni
Valid XHTML 1.0! Valid CSS!
Page created in 0.063 seconds with 20 queries.