Answer the question
In order to leave comments, you need to log in
How to protect a folder/file from being renamed in ubuntu 18.04?
How to protect a folder/file from being renamed in ubuntu 18.04?
chown to the web server, chmod 750, but for some reason an ftp user who does not own this folder can rename it.
It cannot download, open it, delete it, set the rights, but it can rename it.
What the heck?
The server sits on ubuntu 18.04, I use vsftpd as ftp
Answer the question
In order to leave comments, you need to log in
The filename is not part of the file, but an entry in the parent folder.
So write-protect the parent folder.
chattr
[email protected]:/tmp$ mkdir test
[email protected]:/tmp$ sudo chattr +i test
[sudo] пароль для zend:
[email protected]:/tmp$ mv test test1
mv: невозможно переместить 'test' в 'test1': Операция не позволена
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question