LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-22-2011, 09:19 AM   #1
ben60
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Rep: Reputation: Disabled
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.
 
Old 08-22-2011, 10:55 AM   #2
linuxxer
Member
 
Registered: Apr 2011
Location: I have my own planet
Distribution: SlackwareŽ
Posts: 100
Blog Entries: 1

Rep: Reputation: 19
Quote:
Originally Posted by ben60 View Post
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
 
Old 08-22-2011, 06:59 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,406

Rep: Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396
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
 
Old 08-23-2011, 03:01 AM   #4
ben60
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-24-2011, 06:03 AM   #5
linuxxer
Member
 
Registered: Apr 2011
Location: I have my own planet
Distribution: SlackwareŽ
Posts: 100
Blog Entries: 1

Rep: Reputation: 19
Quote:
Originally Posted by ben60 View Post
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
 
Old 08-24-2011, 09:10 AM   #6
ben60
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
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.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Newbie needs help to change folder/file permissions theblackpig SUSE / openSUSE 2 07-29-2011 01:57 PM
Linpus Lite - Change File/Folder Permissions osaddict Linux - Newbie 25 09-05-2010 03:01 PM
how to change folder permissions in fc-6 chryslercirrus99 Fedora 3 06-07-2007 06:32 PM
How can I change the access permissions of a file or folder? royeo Linux - Newbie 1 07-25-2006 03:36 PM
Change folder permissions eggoz Linux - Newbie 2 03-17-2003 01:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:40 AM.

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