LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-01-2011, 05:26 AM   #1
noony123
Member
 
Registered: Oct 2010
Posts: 167

Rep: Reputation: 0
chown !


Hi all.

I created a group 'developers'. Then i created 2 users dev1, dev2. Now i created a file 'test.txt'. Using chgrp and chown, i changed owner to dev1 and group to developers. So far so good. Now i logged in as dev2 and tried to change the permissions of this file as follows

chmod 440 test.txt

But it said, operation not permitted.

1) is it because dev1 is the owner ?
2) how can i make dev2 to use chmod ?
3) dev2 has complete access to test.txt file, but still it wasnt able to use chmod. How shall i know which other commands dev2 will not be able to use ?

Note: by mistake i put the wrong title. Sorry for that :-(

Last edited by noony123; 03-01-2011 at 05:37 AM.
 
Old 03-01-2011, 05:47 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
You don't say what the original permission bits are on the file. It appears that dev2 only has read access to the file by means of group permissions. You would need to give write permission to group in order for dev2 to be able to change the file.
 
Old 03-01-2011, 08:17 AM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
Actually only the owner of the file can chmod the file. Even if the group and other had write permissions, the only one that can chmod the file is still just the owner.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on chown ? your_shadow03 Linux - Newbie 4 11-21-2009 02:58 AM
using chown luusac Linux - General 8 08-22-2008 07:32 PM
chown bkcreddy17 Linux - Newbie 1 04-22-2008 08:59 AM
chown rust8y Solaris / OpenSolaris 3 11-02-2007 04:04 PM
chown strycnine Slackware 5 12-07-2006 09:39 AM


All times are GMT -5. The time now is 07:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration