Reputation: 433
I have a dedicated server and i cant delete, rename or move .htaccess file on my ftp.
How i can delete on terminal? my server is ubuntu and i have root access
The permission are set 644
I fixed using chattr -a .htaccess then i was able to delete, but i dont have idea what happen
Upvotes: 2
Views: 5491
Reputation: 316
You need to take a couple of steps. When server does not allow to erase .htaccess file on account folder, I logged in as root. So steps: Use commands
chattr -i .htaccess chmod 777 .htaccess
Then you can delete that .htaccess file, the attributes of .htaccess has been changed so not even a root user can even modify, change attributes at all. The command chattr makes a file untouchable even if you are sudo root, owner, etc
Upvotes: 0
Reputation: 71
You can type the following command:
rm -rf file-name
on your terminal
Upvotes: 2