Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-25-2004, 03:51 AM
|
#1
|
LQ Newbie
Registered: Nov 2004
Posts: 13
Rep:
|
can't delete file !
Hi all,
I'm a RH user ,
I try to move some file from my hdd,
but there'are some errors :
Code:
[root@redserv opt]# chattr -i -R WEB
[root@redserv opt]# rm -Rf WEB
rm: cannot remove directory `WEB/chroot/bin': Operation not permitted
rm: cannot remove directory `WEB/chroot/include': Operation not permitted
rm: cannot chdir from `WEB/chroot/etc/.' to `passwd': Not a directory
rm: cannot chdir from `WEB/chroot/etc/.' to `group': Not a directory
rm: cannot chdir from `WEB/chroot/etc/.' to `resolv.conf': Not a directory
rm: cannot chdir from `WEB/chroot/etc/.' to `hosts': Not a directory
rm: cannot chdir from `WEB/chroot/etc/.' to `nsswitch.conf': Not a directory
rm: cannot chdir from `WEB/chroot/etc/.' to `protocols': Not a directory
rm: cannot remove directory `WEB/scripts': Operation not permitted
rm: cannot remove directory `WEB/bin': Operation not permitted
PLS help me ,
thanks.
|
|
|
11-25-2004, 04:04 AM
|
#2
|
Member
Registered: Jan 2003
Location: Holland
Distribution: OpenBSD 3.6 - Arch Linux 0.7
Posts: 210
Rep:
|
Who owns it and what are the permissions?
Run ls -l and see what that gives.
You can then change the owner/permissions with chown and chmod. After setting those you should be able to delete the files.
Arjan
|
|
|
11-25-2004, 04:24 AM
|
#3
|
LQ Newbie
Registered: Nov 2004
Posts: 13
Original Poster
Rep:
|
I login as root
Hi Hcman ,
I login as root ,
and when i run # ls -l
Quote:
[root@redserv etc]# ls -l
total 24
-rw-r--r-- 1 root root 0 Nov 25 17:12 asd
-rw-r--r-- 1 root root 14 Nov 24 16:08 group
-rw-r--r-- 1 root root 237 Nov 24 16:08 hosts
-rw-r--r-- 1 root root 1686 Nov 24 16:08 nsswitch.conf
-rw-r--r-- 1 root root 0 Nov 24 16:08 passwd
-rw-r--r-- 1 root root 5834 Nov 24 16:08 protocols
-rw-r--r-- 1 root root 25 Nov 24 16:08 resolv.conf
[root@redserv etc]#
|
PLS show me why!
thanks,
|
|
|
11-25-2004, 04:36 AM
|
#4
|
Member
Registered: Jan 2003
Location: Holland
Distribution: OpenBSD 3.6 - Arch Linux 0.7
Posts: 210
Rep:
|
This is the etc/ dir listing; you need it for your /opt/WEB dir.
Then look into chmod and chown (man chmod, man chown for more info).
Arjan
|
|
|
11-25-2004, 04:43 AM
|
#5
|
LQ Newbie
Registered: Nov 2004
Posts: 13
Original Poster
Rep:
|
Hi Hcman,
result of command #ls -l /opt/WEB/ l
Code:
[root@redserv WEB]# ls -l /opt/WEB/
total 12
drwxr-xr-x 2 root root 4096 Nov 25 15:29 bin
drwxr-xr-x 5 root root 4096 Nov 25 15:17 chroot
drwxr-xr-x 2 root root 4096 Nov 25 15:17 scripts
[root@redserv WEB]#
pls help me ,
thanks
|
|
|
11-25-2004, 04:45 AM
|
#6
|
LQ Newbie
Registered: Nov 2004
Posts: 13
Original Poster
Rep:
|
Quote:
Originally posted by Hcman
This is the etc/ dir listing; you need it for your /opt/WEB dir.
Then look into chmod and chown (man chmod, man chown for more info).
Arjan
|
maybe harddisk errors ?
what do u think?
|
|
|
11-25-2004, 04:53 AM
|
#7
|
Member
Registered: Jan 2003
Location: Holland
Distribution: OpenBSD 3.6 - Arch Linux 0.7
Posts: 210
Rep:
|
HD errors are possible but that is such an unsatisfying answer don't you think? :-)
Try removing the subdirs individually or the files within the subdirs.
Arjan
|
|
|
11-25-2004, 04:58 AM
|
#8
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Could you look at the 'ls -la /WEB' listing. Are there hidden files in the directories?
Also, look at output of
lsof | grep WEB | grep -v grep
This will list the processes that may have some files open.
|
|
|
11-25-2004, 07:59 PM
|
#9
|
LQ Newbie
Registered: Nov 2004
Posts: 13
Original Poster
Rep:
|
thanks all,
i do that but i still can't delete them,
I'll try again ,
thanks
|
|
|
11-25-2004, 08:05 PM
|
#10
|
LQ Newbie
Registered: Nov 2004
Posts: 13
Original Poster
Rep:
|
Quote:
Originally posted by Hcman
HD errors are possible but that is such an unsatisfying answer don't you think? :-)
Arjan
|
I think so ,
Quote:
Originally posted by Hcman
Try removing the subdirs individually or the files within the subdirs.
|
I do it but i still can't delete files ----> HD errors
thanks for your help ,
|
|
|
All times are GMT -5. The time now is 04:11 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|