LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-26-2007, 07:44 AM   #1
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 159

Rep: Reputation: 15
Strange Behavior - chown command


Hello.

I'm running Ubuntu Dapper (newly installed). I had been using Breezy for a long time.

When transferring files from another disk, as root, those files are owned by root when they arrive on my Desktop. When I chown them to change ownership, the terminal returns to the prompt with no error notices. But the ownership has not been changed!

I discovered by trial and error that, if I rename the file (even minimally) after chowning, the ownership change takes effect.

That's OK, but kind of a pain in the neck as I must chown, rename, check permissions and rename back.

Anyone know why this should be happening and how to fix it?

Thanks.
 
Old 01-26-2007, 07:56 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I cannot duplicate this.

I assume you are doing chown, followed by ls to see the change. If you were looking in a GUI window, you might have to refresh it.

Do ls -l and post the results here.
 
Old 01-26-2007, 09:03 AM   #3
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 159

Original Poster
Rep: Reputation: 15
Thanks.

I didn't know that command

Output is:

-------------------------------------------------------------------
-rw------- 1 aba aba 0 2007-01-24 11:07 Bank Transfer~
-rw-r--r-- 1 root root 15233 2006-10-26 15:52 Blood Type Diet
-rw------- 1 aba aba 3606 2007-01-26 10:47 Domain People~
-rw------- 1 aba aba 26624 2007-01-24 14:19 DOS Commands~
-rw-rw-rw- 1 aba aba 1098 2005-05-22 16:36 install.rdf~
-rw-r--r-- 1 root root 8979 2006-06-21 20:02 Items re: Ahavas Chesed Work.odt
-rw------- 1 aba aba 777 2007-01-24 18:39 launchy~
-rw------- 1 aba aba 878 2007-01-23 15:15 Linux Help Info~
-rw-r--r-- 1 aba root 774 2007-01-23 17:49 Linux Tasks
-rw-r--r-- 1 aba aba 780 2007-01-23 17:49 Linux Tasks~
-rw------- 1 aba aba 545 2007-01-23 15:18 Network Interfaces~
-rw------- 1 aba aba 0 2007-01-24 19:57 new file~
-rw------- 1 aba aba 1320 2007-01-22 20:08 Panel Font Color~
-rw------- 1 aba root 11 2007-01-08 14:34 Salt Room
-rw------- 1 aba aba 23 2007-01-26 11:12 Site to See
-rw------- 1 aba aba 0 2007-01-26 11:11 Site to See~
-rw-r--r-- 1 aba root 5214 2006-02-28 18:29 Stickies.Backup.txt
-------------------------------------------------------------------

The last file was the one I chowned as a test. If I read this right, it says the ownership WAS changed. But the GUI says it wasn't. I can't delete it from Trash because it says I'm not the owner???!!!
 
Old 01-26-2007, 09:13 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by Ingla
-rw-r--r-- 1 aba root 5214 2006-02-28 18:29 Stickies.Backup.txt
This line says that user aba belonging to group root owns the file. You cannot delete it because the it owns to another group. The right way to change the ownership is to specify both the user and group:
Code:
chown aba:aba Stickies.Backup.txt
as root, should do the trick.
 
Old 01-26-2007, 12:09 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by colucix
This line says that user aba belonging to group root owns the file. You cannot delete it because the it owns to another group. The right way to change the ownership is to specify both the user and group:
Code:
chown aba:aba Stickies.Backup.txt
as root, should do the trick.
This does not look right to me. I think it says the file is owned by aba and by the group named root. It does NOT say that aba is a member of root.
 
Old 01-26-2007, 12:11 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Ingla
If I read this right, it says the ownership WAS changed. But the GUI says it wasn't. I can't delete it from Trash because it says I'm not the owner???!!!
the GUI may need to be refreshed after changing somethin in a terminal.
 
Old 01-27-2007, 10:57 AM   #7
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 159

Original Poster
Rep: Reputation: 15
Thanks for the replies. Sorry, I was away so couldn't get back immediately.

I'll chown this way from now on.

Re: refreshing the GUI, what do you mean? I can't seem to refresh the properties dialog box for a file.
 
Old 01-27-2007, 11:05 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Ingla
Re: refreshing the GUI, what do you mean? I can't seem to refresh the properties dialog box for a file.
Just guessing......
If you have a file browser window open and then click on properties---then you make a change in the terminal---you may have to:
a. close and reopen the properties dialog
b. Do (a) after reloading (refreshing) the window

Try some experiments....
 
Old 01-28-2007, 04:46 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by pixellany
This does not look right to me. I think it says the file is owned by aba and by the group named root. It does NOT say that aba is a member of root.
Just wrong english, sorry. I meant the file, not the user, belong to group root. Probably chown has been used to change only user ownership, not group.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Very strange OS behavior after reinstallation Aranel Mandriva 5 06-15-2006 08:34 AM
XMMS strange behavior jskalsi Linux - Software 1 05-03-2006 06:23 PM
Very Strange Behavior raysr Mandriva 4 08-31-2004 02:06 PM
Strange Behavior andrewb758 Linux - Hardware 5 08-31-2003 02:42 PM
strange behavior abhijit Linux - General 3 07-09-2003 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration