LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-12-2009, 07:59 AM   #1
lewyx
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
chmod says operation not permitted


I have 2 users (a and b) in the users group. The directory "test" and the file "test/example.zip" both have permissions 777 and are owned by a/users.
The other user (b) tries chmod 666 example.zip and gets the error "operation not permitted", though he also has all rights through users (it is the only group a and b belong to).
Why is chmod not permitted for b? Where in the hell can I find documentation about what rights one has to hold to change permissions on an object (odd that man chmod does not mention that)?
 
Old 10-12-2009, 08:02 AM   #2
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Run it as root or use sudo chmod
 
Old 10-12-2009, 08:03 AM   #3
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,436
Blog Entries: 11

Rep: Reputation: 181Reputation: 181
chmod is only usable by the root user or the owner of the file itself.
chown is only usable by the user root. Reason for this is that you could just create a file, put the suid bit onto it and chown it to root and voila root access is yours.
Also when quotas are in use. If I was about to exced my quota I just give my bigest file to you and live happily after...
 
1 members found this post helpful.
Old 10-12-2009, 08:22 AM   #4
lewyx
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by zhjim View Post
chmod is only usable by the root user or the owner of the file itself.
chown is only usable by the user root. Reason for this is that you could just create a file, put the suid bit onto it and chown it to root and voila root access is yours.
Also when quotas are in use. If I was about to exced my quota I just give my bigest file to you and live happily after...
The reasons for chown are straightforward.
The limitation for chmod I do not understand. How can I make a group of people manage their own things?! Can I not achieve that anyone who can write a directory may change the files metadata (like rights) within?

Currently the users in "users" have to maintain the directory (and its subtree) "test", they _all_ need to be able to change the contents and adjust permission, but they must not be granted any other privileges (especially not any root permissions).
 
Old 10-12-2009, 09:53 AM   #5
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,436
Blog Entries: 11

Rep: Reputation: 181Reputation: 181
As long as users are all in the same group you can work with umask to make sure everybody has the right to write to it. Also the suid group bit might be to some help. When set to a dir every file underneith it while be created with the group.
Or check out on ACL's. They give you finer control of access rights. But I dunno if you'll be able to allow things like chmod.

Maybe if you supply some use cases we'll find something suitable?
 
Old 10-12-2009, 10:00 AM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,043
Blog Entries: 1

Rep: Reputation: 1369Reputation: 1369Reputation: 1369Reputation: 1369Reputation: 1369Reputation: 1369Reputation: 1369Reputation: 1369Reputation: 1369Reputation: 1369
Hi,

Welcome to LQ!

Just a few links to aid you;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Ultimate Linux Newbie Guide
LinuxSelfHelp
Getting Started with Linux
Advanced Bash-Scripting Guide

These links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
  


Reply

Tags
chmod, permission


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
Operation not permitted prasunhowlader Linux - Newbie 3 08-20-2008 09:29 PM
Logged in as "root"/Fedora 8 but get "Operation not permitted" when using "chmod etc gosunlee Linux - Newbie 7 02-10-2008 05:56 AM
Operation not permitted jakkals Linux - General 3 09-26-2005 07:30 PM
su - operation not permitted jrtayloriv Linux - Newbie 2 06-09-2005 09:27 PM
Operation not permitted FrozenShadow23 Linux - Newbie 6 10-05-2003 05:13 PM


All times are GMT -5. The time now is 03:59 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration