LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Change File/folder Permissions in server (https://www.linuxquestions.org/questions/linux-newbie-8/change-file-folder-permissions-in-server-898765/)

ben60 08-22-2011 09:19 AM

Change File/folder Permissions in server
 
I have been trying to change file permissions to 777 in the web server to no success. My main challenge is to locate the exact file, i.e if its called temp inside a folder called penzi, should i use /var/www/penzi/temp?
Please advice as am new to Linux.

linuxxer 08-22-2011 10:55 AM

Quote:

Originally Posted by ben60 (Post 4450127)
I have been trying to change file permissions to 777 in the web server to no success. My main challenge is to locate the exact file, i.e if its called temp inside a folder called penzi, should i use /var/www/penzi/temp?
Please advice as am new to Linux.

TO change the file permissions, login as 'root' user and type:
#chmod -R 777 directory_name
I think, you know this command.

To locate files, use:
#find /var/www/penzi -iname "*search_directory_name*" -print

chrism01 08-22-2011 06:59 PM

If you want to change the file only,
Code:

chmod 777 filename
if you are already in the correct dir, otherwise provide entire path eg
Code:

chmod 777 /path/to/file
To find a file in /var/www dir tree
Code:

find /var/www -type f -iname 'filename' -print
http://linux.die.net/man/1/chmod
http://linux.die.net/man/1/find

ben60 08-23-2011 03:01 AM

Thanks guys for the assistance, though is still am unable to locate the file, and i have logged in as root. when i type the path; # find /var/www/penzi -name "temp" -print it returns below
find: /var/www/penzi: No such file or directory
and yet i am in the root directory.
When i type cd /var/www/penzi/ i get;
-bash: cd: /var/www/penzi/: No such file or directory
I am just unable to locate to that file. Please advice

linuxxer 08-24-2011 06:03 AM

Quote:

Originally Posted by ben60 (Post 4450871)
Thanks guys for the assistance, though is still am unable to locate the file, and i have logged in as root. when i type the path; # find /var/www/penzi -name "temp" -print it returns below
find: /var/www/penzi: No such file or directory
and yet i am in the root directory.
When i type cd /var/www/penzi/ i get;
-bash: cd: /var/www/penzi/: No such file or directory
I am just unable to locate to that file. Please advice


Login as root and enter this command,

#find /var/www | less

ben60 08-24-2011 09:10 AM

Thanx guys, it worked, apparently i was accessing the wrong server, so i couldnt get the files i wanted. Thanks for the assistance, i appreciate.


All times are GMT -5. The time now is 03:47 AM.