LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-08-2011, 07:51 AM   #1
rit_netsys
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Rep: Reputation: 0
Unable to delete folder


I am trying to delete a folder, but unable to do so. tried my level best to delete.
Here I am giving all the steps I have tried out -

1. Output of ls -la


ls: cannot access -loop0: Permission denied
ls: cannot access -e0.7: Permission denied
total 324
d????????? ? ? ? ? ? -e0.7
d????????? ? ? ? ? ? -loop0
drwxrwxrwx 4 geeko root 4096 Feb 8 14:46 .
drwxrwxrwt 5607 root root 323584 Feb 8 17:48 ..


2. Tried to change Permission with chmod -R 777, ( chmod -R 777 "-e0.7") but did not work.

chmod -R 777 "-e0.7"
chmod: invalid option -- 'e'
Try `chmod --help' for more information.

3. Tried to change Ownership with chown -

chown -R root "-e0.7"
chown: invalid option -- 'e'
Try `chown --help' for more information.

4. rm -rf "-e0.7"
rm: invalid option -- 'e'
Try `rm --help' for more information.

5. rm -rf ../"-e0.7"
This command does not show any error, but folder is not being deleted.

6. Even I have tried to delete the folder with inode number, but failed to do so.

Tried with

ldmserver2:/tmp/.abhishek.parwal-ltspfs # rm -rf "\-e0.7"
ldmserver2:/tmp/.abhishek.parwal-ltspfs # ls -la
ls: cannot access -loop0: Permission denied
ls: cannot access -e0.7: Permission denied
total 324
d????????? ? ? ? ? ? -e0.7
d????????? ? ? ? ? ? -loop0
drwxrwxrwx 4 geeko root 4096 Feb 8 14:46 .
drwxrwxrwt 5606 root root 323584 Feb 8 18:07 ..




As per my thinking, I need to change the permission of the folder first, but unable to change.

Any help will be appreciated.
 
Old 02-08-2011, 08:14 AM   #2
joymyr
LQ Newbie
 
Registered: Feb 2011
Posts: 3

Rep: Reputation: 0
Did you try rm -R ./-e0.7 ?
 
Old 02-08-2011, 08:29 AM   #3
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,665

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by rit_netsys View Post

ls: cannot access -loop0: Permission denied
ls: cannot access -e0.7: Permission denied
total 324
d????????? ? ? ? ? ? -e0.7
d????????? ? ? ? ? ? -loop0
drwxrwxrwx 4 geeko root 4096 Feb 8 14:46 .
drwxrwxrwt 5607 root root 323584 Feb 8 17:48 ..
Hi,

the '?' indicate that the containing folder does not have execute permissions. You will have to correct this first before you can do anything to the contents in that folder. In the folder that contains "-e0.7" issue
Code:
sudo chmod +x .
Then you can try again to delete it. One of the things you tried should work. If not, then post again the output of
ls -al
lsattr
 
Old 02-08-2011, 08:30 AM   #4
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 623

Rep: Reputation: 64
Quote:
Originally Posted by rit_netsys View Post
I am trying to delete a folder, but unable to do so. tried my level best to delete.
Here I am giving all the steps I have tried out -

1. Output of ls -la


ls: cannot access -loop0: Permission denied
ls: cannot access -e0.7: Permission denied
total 324
d????????? ? ? ? ? ? -e0.7
d????????? ? ? ? ? ? -loop0
drwxrwxrwx 4 geeko root 4096 Feb 8 14:46 .
drwxrwxrwt 5607 root root 323584 Feb 8 17:48 ..


2. Tried to change Permission with chmod -R 777, ( chmod -R 777 "-e0.7") but did not work.

chmod -R 777 "-e0.7"
chmod: invalid option -- 'e'
Try `chmod --help' for more information.

3. Tried to change Ownership with chown -

chown -R root "-e0.7"
chown: invalid option -- 'e'
Try `chown --help' for more information.

4. rm -rf "-e0.7"
rm: invalid option -- 'e'
Try `rm --help' for more information.

5. rm -rf ../"-e0.7"
This command does not show any error, but folder is not being deleted.

6. Even I have tried to delete the folder with inode number, but failed to do so.

Tried with

ldmserver2:/tmp/.abhishek.parwal-ltspfs # rm -rf "\-e0.7"
ldmserver2:/tmp/.abhishek.parwal-ltspfs # ls -la
ls: cannot access -loop0: Permission denied
ls: cannot access -e0.7: Permission denied
total 324
d????????? ? ? ? ? ? -e0.7
d????????? ? ? ? ? ? -loop0
drwxrwxrwx 4 geeko root 4096 Feb 8 14:46 .
drwxrwxrwt 5606 root root 323584 Feb 8 18:07 ..




As per my thinking, I need to change the permission of the folder first, but unable to change.

Any help will be appreciated.
Try implementing acl to the folder and deleting it.
 
Old 02-09-2011, 04:02 AM   #5
rit_netsys
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Original Poster
Rep: Reputation: 0
Wink

Quote:
Originally Posted by crts View Post
Hi,

the '?' indicate that the containing folder does not have execute permissions. You will have to correct this first before you can do anything to the contents in that folder. In the folder that contains "-e0.7" issue
Code:
sudo chmod +x .
Then you can try again to delete it. One of the things you tried should work. If not, then post again the output of
ls -al
lsattr




Thankssssss...... Problem has been solved....
 
Old 02-09-2011, 06:33 AM   #6
rit_netsys
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Original Poster
Rep: Reputation: 0
Unable to delete folder

With reference to the below link -


http://www.linuxquestions.org/questi...folder-861387/

I could removed folder from 3 servers, but I failed again in another server. Here is the error report -

ldmserver1:/tmp/.abhishek.parwal-ltspfs # chmod +x
chmod: missing operand after `+x'
Try `chmod --help' for more information.
ldmserver1:/tmp/.abhishek.parwal-ltspfs # chmod +x .
ldmserver1:/tmp/.abhishek.parwal-ltspfs # ls -la
ls: cannot access -loop0: Permission denied
ls: cannot access -e0.7: Permission denied
total 296
d????????? ? ? ? ? ? -e0.7
d????????? ? ? ? ? ? -loop0
drwxr-xr-x 4 root allusers 4096 Feb 9 16:21 .
drwxrwxrwt 207 root root 294912 Feb 9 16:57 ..
ldmserver1:/tmp/.abhishek.parwal-ltspfs # ls -la
ls: cannot access -loop0: Permission denied
ls: cannot access -e0.7: Permission denied
total 296
d????????? ? ? ? ? ? -e0.7
d????????? ? ? ? ? ? -loop0
drwxr-xr-x 4 root allusers 4096 Feb 9 16:21 .
drwxrwxrwt 207 root root 294912 Feb 9 17:00 ..
ldmserver1:/tmp/.abhishek.parwal-ltspfs # lsattr
./-loop0: Permission denied
./-e0.7: Permission denied
ldmserver1:/tmp/.abhishek.parwal-ltspfs # chmod +x "-e0.7"
chmod: invalid option -- 'e'
Try `chmod --help' for more information.
ldmserver1:/tmp/.abhishek.parwal-ltspfs # cd ..
ldmserver1:/tmp # chmod -R +x .abhishek.parwal-ltspfs
chmod: cannot access `.abhishek.parwal-ltspfs/-loop0': Permission denied
chmod: cannot access `.abhishek.parwal-ltspfs/-e0.7': Permission denied
ldmserver1:/tmp #



P.S : Sayan da.... If possible... please help
 
Old 02-09-2011, 06:40 AM   #7
appilu
Member
 
Registered: Jan 2011
Distribution: RedHat,Debian-Ubuntu,Fedora
Posts: 73

Rep: Reputation: 8
Hi,

try giving chmod 777 <filename>
 
Old 02-09-2011, 02:10 PM   #8
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
As this is related to the linked thread, I have merged the two threads.
 
Old 02-10-2011, 02:27 AM   #9
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 623

Rep: Reputation: 64
Quote:
Originally Posted by rit_netsys View Post
With reference to the below link -


http://www.linuxquestions.org/questi...folder-861387/

I could removed folder from 3 servers, but I failed again in another server. Here is the error report -

ldmserver1:/tmp/.abhishek.parwal-ltspfs # chmod +x
chmod: missing operand after `+x'
Try `chmod --help' for more information.
ldmserver1:/tmp/.abhishek.parwal-ltspfs # chmod +x .
ldmserver1:/tmp/.abhishek.parwal-ltspfs # ls -la
ls: cannot access -loop0: Permission denied
ls: cannot access -e0.7: Permission denied
total 296
d????????? ? ? ? ? ? -e0.7
d????????? ? ? ? ? ? -loop0
drwxr-xr-x 4 root allusers 4096 Feb 9 16:21 .
drwxrwxrwt 207 root root 294912 Feb 9 16:57 ..
ldmserver1:/tmp/.abhishek.parwal-ltspfs # ls -la
ls: cannot access -loop0: Permission denied
ls: cannot access -e0.7: Permission denied
total 296
d????????? ? ? ? ? ? -e0.7
d????????? ? ? ? ? ? -loop0
drwxr-xr-x 4 root allusers 4096 Feb 9 16:21 .
drwxrwxrwt 207 root root 294912 Feb 9 17:00 ..
ldmserver1:/tmp/.abhishek.parwal-ltspfs # lsattr
./-loop0: Permission denied
./-e0.7: Permission denied
ldmserver1:/tmp/.abhishek.parwal-ltspfs # chmod +x "-e0.7"
chmod: invalid option -- 'e'
Try `chmod --help' for more information.
ldmserver1:/tmp/.abhishek.parwal-ltspfs # cd ..
ldmserver1:/tmp # chmod -R +x .abhishek.parwal-ltspfs
chmod: cannot access `.abhishek.parwal-ltspfs/-loop0': Permission denied
chmod: cannot access `.abhishek.parwal-ltspfs/-e0.7': Permission denied
ldmserver1:/tmp #
I'd suggest you to go one directory up and try to give full permission on that recursively using the -R option, see if that helps.


Quote:
P.S : Sayan da.... If possible... please help
Err.......Are you bengali too? :O Don't know if you are eligible to call me "da", what is your age? I'm 23.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unable to delete folder rit_netsys Linux - General 4 02-09-2011 04:02 AM
unable to share a folder in suse 10.0, folder defaults to not shared sirius57 Linux - General 1 05-15-2010 04:33 AM
[SOLVED] Unable to delete MythTV folder Byuel3 Linux - Newbie 5 09-14-2009 12:56 AM
unable to delete folder in Mandriva 2007 Gnodab Linux - Newbie 4 12-19-2006 06:39 PM
Unable to delete folder arctuniol Red Hat 2 10-11-2004 03:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration