V
V
visoVV2020-01-29 06:51:53
CentOS
visoVV, 2020-01-29 06:51:53

How to change permissions?

Centos 7
can't change the permissions for folders and files
, I log in as root

file '/var/log/messages': open error: Read-only file system [v8.24.0-41.el7_7.2 try www.rsyslog.com /e/2433 ]

Change with sftp error:
General error (server should provide error description).
Error code: 4
Error message from the server: Failure

I change from the console chmod 777 * -R /var/log/messages
permissions do not change

It says that there is no directory
chmod: cannot access '/var/lib/rsyslog/imjournal.state.tmp' : No such file or directory
although the file is in this directory

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
Germanjon, 2020-01-29
@Germanjon

Maybe it's all about this:

'/var/log/messages': open error: Read-only file system

1. First run mount without options to see what partition the given path is on (the partition can be mounted on / , on /var/ , on /var/log/ )
2. Then try to remount this partition in Read-Write mode with the mount command -o remount,rw /var . Replace "/var" with the partition that is mounted.
3. If it does not work out, write - I'll think again.
On the issue:
chmod: cannot access '/var/lib/rsyslog/imjournal.state.tmp': No such file or directory

Run ls -lh /var/lib/rsyslog/ and attach a screenshot here. We'll keep thinking.

R
Ruslan Fedoseev, 2020-01-29
@martin74ua

reboot server, check FS if needed

C
CityCat4, 2020-01-29
@CityCat4

You have a readonly mounted file system, until you remount it to rw - nothing will work for you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question