S
S
Sergey2015-01-13 10:28:38
linux
Sergey, 2015-01-13 10:28:38

How to delete a folder from under root if it says "Permission denied"?

Rearranged the system, saved the /home/ partition There was an admin user, deleted everything from his folder, but three folders do not want to be deleted under root. here is an example of one, empty inside

sudo rm -rf web
rm: невозможно удалить «web»: Отказано в доступе

lsattr -d /home/admin/conf/web
-------------e-- /home/admin/conf/web

[email protected]:/home/admin/conf/web$ mount | grep /dev/
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
/dev/sdb9 on /home type ext4 (rw)
/dev/sdb8 on /storage type ext4 (rw)
/dev/sdb6 on /media/cj/Storage type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdb7 on /media/cj/6EAAAA43AAAA07A3 type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdb4 on /media/cj/50AA706AAA704E8A type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Lerg, 2015-01-13
@gangstarcj

Most likely, the /home/admin/conf directory has an immutable attribute.
Remove it and everything will work out.
chattr -i /home/admin/conf

I
ivankomolin, 2015-01-13
@ivankomolin

Are you really root?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question