LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   File Permissions/ Can't save or delete website files (https://www.linuxquestions.org/questions/linux-security-4/file-permissions-cant-save-or-delete-website-files-350510/)

friendlyflier 08-06-2005 04:36 AM

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

Linux~Powered 08-06-2005 08:14 AM

If it's root.root, then log in as root and delelte it.

Code:

su -c rm yourfile
You want most files in that directory to belong to root.

friendlyflier 08-07-2005 02:07 AM

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.

friendlyflier 08-07-2005 02:18 AM

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?

demian 08-07-2005 06:32 AM

Code:

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.

This:

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).


All times are GMT -5. The time now is 01:20 PM.