Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 08-06-2005, 04:36 AM   #1
LQ Newbie
Registered: Aug 2005
Posts: 3

Rep: Reputation: 0
File Permissions/ Can't save or delete website files

I have a file that will not let me delete it. I think it might be due to messed up file permissions of my own doing. the file permissions for that file are root.root and my name is scott when it was created. How do I change this back so I can delete the bad file out of /var/www/html directory. I am using Fedora Core version 2. Also I need to be able to save future new files for my website and it says im not allowed to???? What do I type to get it all right way again? Thanks
Old 08-06-2005, 08:14 AM   #2
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 845

Rep: Reputation: 33
If it's root.root, then log in as root and delelte it.

su -c rm yourfile
You want most files in that directory to belong to root.
Old 08-07-2005, 02:07 AM   #3
LQ Newbie
Registered: Aug 2005
Posts: 3

Original Poster
Rep: Reputation: 0
I have spaces in my file name/won't delete

Hi there I tried that,what u said ....logging in as "root" as in su. I have this file that has spaces between the words. Celia Clarks Watercolor Works.html in my /var/www/html folder. Should of been index.html. I tried deleting it and it thinks Celia is one file name instead of the whole thing. My name (userid) is scott. Root is "su" This is driving me up the wall. I think it thinks "root" is my userid? Any suggestions are welcomed. Thanks in advance.
Old 08-07-2005, 02:18 AM   #4
LQ Newbie
Registered: Aug 2005
Posts: 3

Original Poster
Rep: Reputation: 0
copying terminal text to you.

mv Celia Clarks Watercolor Works.html celiaclarkswatercolorworks.html /var/www/html
mv: cannot stat `Celia': No such file or directory
mv: cannot stat `Clarks': No such file or directory
mv: cannot stat `Watercolor': No such file or directory
mv: cannot stat `Works.html': No such file or directory
mv: cannot stat `celiaclarkswatercolorworks.html': No such file or directory
[root@localhost html]# See I am logged in as su. With the # at the end of the prompt. What do I do here?
Old 08-07-2005, 06:32 AM   #5
Registered: Apr 2001
Location: Bremen, Germany
Distribution: Debian
Posts: 303

Rep: Reputation: 30
mv Celia\ Clarks\ Watercolor\ Works.html celiaclarkswatercolorworks.html
You need to escape blank characters on the shell or else it will be interpreted as an argument separator. Alternatively you can enclose the filename including blanks in quotes.


mv Celia Clarks Watercolor Works.html whatever

means "move the files Celia, Clarks, Watercolor and Works.html to the directory whatever".

To make things easier you can use tab completion: Just type

mv Celi

and then hit the TAB key. If the part of the filename you've entered is unambiguous it will be automatically completed.

You should read a beginners bash tutorial (google it).


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to delete files with 0k file size in a directory justgiver Linux - Newbie 4 01-28-2008 04:56 AM
Frustrated, file permissions sharing files sporks Linux - General 9 04-20-2005 08:37 PM
Changing file permissions within a directory for all files. cajunaggie Linux - Newbie 2 02-06-2005 01:53 AM
recursive file permissions does not change new files in same directory PAB Linux - Newbie 2 03-08-2004 12:27 PM
force delete/remove and mass file permissions-setting moxieman99 Linux - Newbie 2 02-15-2004 11:43 AM > Forums > Linux Forums > Linux - Security

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

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