Cannot delete no permission file


 
Thread Tools Search this Thread
Operating Systems Linux SuSE Cannot delete no permission file
# 1  
Old 02-08-2011
Bug Cannot delete no permission file

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
Code:
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.
Code:
chmod -R 777 "-e0.7"
chmod: invalid option -- 'e'
Try `chmod --help' for more information.

3. Tried to change Ownership with chown -
Code:
chown -R root "-e0.7"
chown: invalid option -- 'e'
Try `chown --help' for more information.

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

5.
Code:
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.


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

Any help will be appreciated.

Last edited by Yogesh Sawant; 02-09-2011 at 07:51 AM.. Reason: added code tags
# 2  
Old 02-08-2011
add another -- before the the filename
This will stop the programs from thinking it is another switch argument.
e.g.
Code:
chmod -R 777 -- -e0.7


Last edited by Yogesh Sawant; 02-09-2011 at 07:51 AM.. Reason: added code tags
# 3  
Old 02-09-2011
Thanks for your reply.
Tried your instruction but its giving the same error:

Code:
ldmserver1:/tmp/.abhishek.parwal-ltspfs # chmod -R 777 -- -e0.7
chmod: cannot access `-e0.7': Permission denied
ldmserver1:/tmp/.abhishek.parwal-ltspfs #

Tried this too:
Code:
ldmserver1:/tmp/.abhishek.parwal-ltspfs # chmod +x "-e0.7"
chmod: invalid option -- 'e'
Try `chmod --help' for more information.
ldmserver1:/tmp/.abhishek.parwal-ltspfs #


Last edited by Yogesh Sawant; 02-09-2011 at 07:52 AM.. Reason: added code tags
# 4  
Old 02-09-2011
Those files look like devices (they would normally be in /dev), and are files that you should NOT be modifying.
What is "ltspfs"? it sounds like a remote file system.
If you somehow unmount or stop ltspfs, and then try deleting again, does that work?
I don't think you shouldn't remove or change these files while ltspfs is running.
# 5  
Old 02-10-2011
Ya, we are trying to mount usb flash drive for the user which runs on LTSP server. What happens is that, sometimes if the UID is changed for the user he cannot access his pen drive so if we delete it from the /tmp and add a line of his UID in /etc/mtab, it starts working. So there is no harm to delete from the /tmp Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Is rsync --delete on some files without write permission possible?

Hello all, I have a problem with rsync command. From a backup server, I use a command like the one below: rsync -av --delete user@host:/home/user/ /home/backup_user/daily_rotating_backup/ In some folders of the user there are some files on which he has removed his write permission on... (3 Replies)
Discussion started by: freddie50
3 Replies

2. Red Hat

Need Script to ZIP/SAVE & then DELETE Log file & DELETE ZIPS older than 12 months

ENVIROMENT Linux: Fedora Core release 1 (Yarrow) iPlanet: iPlanet-WebServer-Enterprise/6.0SP1 Log Path: /usr/iplanet/servers/https-company/logs I have iPlanet log rotation enabled rotating files on a daily basis. The rotated logs are NOT compressed & are taking up too much space. I... (7 Replies)
Discussion started by: zachs
7 Replies

3. Solaris

Delete Permission on Directory

Hi, I have a directory /u01/source. Following are current permission on directory source. oracle@TEST # ls -l source drwxrwxrwx 2 user1 userbi 31232 Apr 8 13:33 EG1 drwxrwxrwx 2 user1 userbi 1024 Apr 8 05:45 E2 drwxrwxrwx 2 user1 userbi 57344 Mar 15 10:22 h5 There is another ... (4 Replies)
Discussion started by: fahdmirza
4 Replies

4. Post Here to Contact Site Administrators and Moderators

shouldnt we also have the permission to delete our threads

i think we should also have the permissions to delete our own thread (3 Replies)
Discussion started by: tarunicon
3 Replies

5. UNIX for Dummies Questions & Answers

permission on file

i have two user named sourav and jishu. i have created a file named source.txt in sourav. i made another user called shovon. i want to give read write permission of souce.txt for shovon but not for jishu. how can i set permission only for jishu ? (1 Reply)
Discussion started by: sourav_ray
1 Replies

6. Cybersecurity

file permission/acl: 2 users with write access on 1 file...

Hello, i need some help/advice on how to solve a particular problem. these are the users: |name | group | ---------- --------------- |boss | department1 | |assistant | department1 | |employee | department1 | |spy | department2 | this is the... (0 Replies)
Discussion started by: elzalem
0 Replies

7. UNIX for Dummies Questions & Answers

Find who has permission to delete

All, I am running a script , which has permision as below -r-xr-x--- 1 pmgr ffw 11660 Sep 3 2003 ccln and tring to delete the file in the directory inter (sys212:pct:/>) ll | grep ^d dr-xr-xr-x 32 bin bin 8192 Dec 24 03:24 etc drwxr-xr-x 32... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

8. UNIX for Advanced & Expert Users

File Permission

User - sysopr need to convert the output file from Oracle UTL_FILE_DIR using dos2unix command. However, the file owner and the group is belongs to oracle with dba group as follows: -rw-r--r-- 1 oradw dba 22049864 May 23 15:37 transmission*.csv What are the possible methods to... (2 Replies)
Discussion started by: KhawHL
2 Replies

9. UNIX for Dummies Questions & Answers

unable to delete file for permission problem

Hi, We are facing problem to delete some logfiles. Explaing with example for clear understanding : we have 2 accounts : prdpqrs (application account) & prodxyz (admin account - not root). Both of them are in same group called 'release' While prodxyz is trying to remove a file owned by... (4 Replies)
Discussion started by: sabyasm
4 Replies

10. Shell Programming and Scripting

The file permission

there is a directory eg. /home/edp/ , all the files under this directory : 1. the file and directory owner is "user1" , 2. the permission is 644 I want everyone hv permission to overwrite all files and write a new file to it , but I want the file owner and permssion keep unchange , could... (1 Reply)
Discussion started by: ust
1 Replies
Login or Register to Ask a Question