Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by gumball60
at 2024-11-15 05:51:22
Point:400 Replies:14 POST_ID:828791USER_ID:11593
Topic:
Linux;Linux Networking;Linux Distributions
I am trying to change the permissions of an application file(xxx.cfg) permissions from 464 to 466. I am signing into the server with my administrative account. My OS is RHEL 6.4.
ex. chmod 466 xxx.cfg
chmod: changing permissions of ‘.’: Operation not permitted
How can I change the permissions to this file?
ex. chmod 466 xxx.cfg
chmod: changing permissions of ‘.’: Operation not permitted
How can I change the permissions to this file?
Accepted Solution
Expert: Luxana replied at 2024-11-17 08:12:52
200 points AVERAGE
Hello,
just a thought. Make sure that your file from some reason is not have immutable or some other attributes assigned which may cause your problems:
Example:
just a thought. Make sure that your file from some reason is not have immutable or some other attributes assigned which may cause your problems:
Example:
touch foobarls -l foobar-rw-r--r-- 1 root root 0 Nov 17 17:07 foobarchmod 777 foobarls -l foobar-rwxrwxrwx 1 root root 0 Nov 17 17:07 foobarchattr +i foobarchmod 666 foobarchmod: changing permissions of `foobar': Operation not permitted 1:2:3:4:5:6:7:8:9:
Check your file with:
to see whether this is the case. If yes remove any obscuring attribute with:
Expert: expert1010 replied at 2024-11-16 03:06:52
A bit late into the game but since no one else mentioned it. Are you sure you're using the right chmod? You might have a PATH that points to another place than the standard for chmod.
ls -l `which chmod`
file `which chmod`
ls -l `which chmod`
file `which chmod`
Expert: Mazdajai replied at 2024-11-15 09:53:56
-r--rw-r-- 1 root domain users 22090 Jun05 22:28 xxx.cfgid myusernameuid =(myusername), gid=(domain_users), group=(domain_users), (today_users), (ns_users), BUILTINusers 1:2:3:
Let's make it clear - this account does not have limited root access. I think you need to be the owner to change the perm.
Have you ask someone with root access to run the same command to rule out a possible permission issue?
Expert: savone replied at 2024-11-15 09:14:15
Why did you eliminate the UID and GID numbers? Can you also show the output of
cat /etc/group
cat /etc/group
Assisted Solution
Expert: duncanb7 replied at 2024-11-15 08:51:05
200 points AVERAGE
Please try it again,
input username to what login name you access the linux shell
(if you are users, input your username)
chown -R -v username xxx.cfg
chgrp -R -v username xxx.cfg
chmod 466 xxx.cfg
I got the same problem before and then fix it by chgrp and chown
if not
copy xxx.cfg junk
chmod 466 junk
ls -la junk
copy junk xxx.cfg ( chmod is working)
input username to what login name you access the linux shell
(if you are users, input your username)
chown -R -v username xxx.cfg
chgrp -R -v username xxx.cfg
chmod 466 xxx.cfg
I got the same problem before and then fix it by chgrp and chown
if not
copy xxx.cfg junk
chmod 466 junk
ls -la junk
copy junk xxx.cfg ( chmod is working)
Author: gumball60 replied at 2024-11-15 08:49:50
eliminated uid, gid numbers....
id myusername
uid =(myusername), gid=(domain_users), group=(domain_users), (today_users), (ns_users), BUILTINusers
id myusername
uid =(myusername), gid=(domain_users), group=(domain_users), (today_users), (ns_users), BUILTINusers
Expert: savone replied at 2024-11-15 08:24:35
I am not sure I understand what that means "an administrator with limited root permissions".
Are you using sudo?
Can you do this, run the following command and replace username with your "administrator" username (post results here).
id username
If you are not in the "domain users" group you do not have the correct access to chmod this file.
Are you using sudo?
Can you do this, run the following command and replace username with your "administrator" username (post results here).
id username
If you are not in the "domain users" group you do not have the correct access to chmod this file.
Author: gumball60 replied at 2024-11-15 08:05:41
duncanb7 The application does not require root to have that level of control.
savonne I noticed the 'domain users" too, that may be part of the problem. I am a administrator with limited root permissions.
I cannot su to root
savonne I noticed the 'domain users" too, that may be part of the problem. I am a administrator with limited root permissions.
I cannot su to root
Expert: savone replied at 2024-11-15 07:29:16
You said you are logged in as your administrator account. What exactly is that? There is no administrator other than root by default.
Another problem you might have is it looks like you have a group name that contains spaces. I can see this causing issues as well.
-r--rw-r-- 1 root domain users 22090 Jun05 22:28 xxx.cfg
Try to change to root and make the changes.
Another problem you might have is it looks like you have a group name that contains spaces. I can see this causing issues as well.
-r--rw-r-- 1 root domain users 22090 Jun05 22:28 xxx.cfg
Try to change to root and make the changes.
Expert: duncanb7 replied at 2024-11-15 06:43:29
chown -R -v root xxx.cfg
chgrp -R -v root xxx.cfg
chmod 466 xxx.cfg #(OR su chmod 466 xxx.cfg)
chgrp -R -v root xxx.cfg
chmod 466 xxx.cfg #(OR su chmod 466 xxx.cfg)
Author: gumball60 replied at 2024-11-15 06:37:41
No wildcards was used. I was in the directory where the file was located...then entered
chmod 466 xxx.cfg (xxx = filename)
chmod 466 xxx.cfg (xxx = filename)
Expert: 172pilotSteve replied at 2024-11-15 06:34:05
It sounds like because you are using the wildcard, it is failing on the first item in the directory listing, which is the "." entry, meaning the current directory.
Because it is failing on that entry, perhaps it's not going to the next item, although I would have expected it to continue.
try chmod with the explicit filename:
chmod 466 xxx.cfg
Better yet, to make sure you're root:
su chmod 466 xxx.cfg
Let us know how that goes!
Because it is failing on that entry, perhaps it's not going to the next item, although I would have expected it to continue.
try chmod with the explicit filename:
chmod 466 xxx.cfg
Better yet, to make sure you're root:
su chmod 466 xxx.cfg
Let us know how that goes!
Author: gumball60 replied at 2024-11-15 06:21:36
Here is more info on the file.
ls -lrt xxx.cfg
-r--rw-r-- 1 root domain users 22090 Jun05 22:28 xxx.cfg
ls -lrt xxx.cfg
-r--rw-r-- 1 root domain users 22090 Jun05 22:28 xxx.cfg
Expert: mankowitz replied at 2024-11-15 05:59:05
it looks like you are trying to change permission of the current directory, called ".". Are you sure you are not using any wildcards, like
chmod 466 *
chmod 466 *