Reply

Join Date: Apr 2008
Posts: 485
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

permision in www folder

 
0
  #1
Nov 30th, 2008
Hi,

I cant save any php file into www. Gives permission error in text editor. But, i can save with using sudo nano ..... in terminal. In the properties of www directory, it permites only root.
How do i solve this problem?

Thanks
Last edited by veledrom; Nov 30th, 2008 at 10:20 pm. Reason: .
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 15,976
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 506
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: permision in www folder

 
0
  #2
Nov 30th, 2008
have you got a gui or not?
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,176
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: permision in www folder

 
0
  #3
Dec 1st, 2008
Originally Posted by veledrom View Post
Hi,

I cant save any php file into www. Gives permission error in text editor. But, i can save with using sudo nano ..... in terminal. In the properties of www directory, it permites only root.
How do i solve this problem?

Thanks

Thats because of the file permission system of Linux. It allows only root to write to the www folder because most probably the owner of that directory is root and the permissions for that folder will be 755.

To just allow your user to write to that folder you could do : -
  1. Make the owner of the "www" directory your user, by using the chown command.
  2. Set the permissions of the folder "www" to 757 using chmod command. But this would be a security hazard since anyone and everyone will then be allowed to write to that folder.

And if you wish to know how to use the commands theres always the man <command-name> or info <command-name> to assist.

To get a more in depth understanding of Linux file permissions you can go here.
Last edited by stephen84s; Dec 1st, 2008 at 4:56 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 485
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

Re: permision in www folder

 
0
  #4
Dec 1st, 2008
When you say "But this would be a security hazard since anyone and everyone will then be allowed to write to that folder.
", do you mean anyone on the Internet because, i am using this at home and only access to the Internet.

Also when i do
Chmod 757 /var/www/
it generates an error which says "bash : Chmod command not found". i am in terminal.
Last edited by veledrom; Dec 1st, 2008 at 7:50 am. Reason: .
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 15,976
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 506
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: permision in www folder

 
0
  #5
Dec 1st, 2008
use a small C, linux is case sensitive
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,176
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: permision in www folder

 
0
  #6
Dec 1st, 2008
Originally Posted by veledrom View Post
When you say "But this would be a security hazard since anyone and everyone will then be allowed to write to that folder.
", do you mean anyone on the Internet because, i am using this at home and only access to the Internet.

Also when i do
Chmod 757 /var/www/
it generates an error which says "bash : Chmod command not found". i am in terminal.

Well all you had to do was just copy paste the command from my post. But I still suggest rather than changing the permission to 757, you change the owner of the folder "www" to the one you are using.
If you are just using it at home then I guess it wouldn't be too much of a problem (as long as you do not have a static IP address), but according to me its always best to follow the safer practice everywhere especially if it doesn't take too much effort from your side.
Last edited by stephen84s; Dec 1st, 2008 at 8:21 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 485
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

Re: permision in www folder

 
0
  #7
Dec 1st, 2008
Ok. In the properties of www directory, it permites only root and it is not enabled. Also, there is not other option to let me add my user. How do i do it?
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 15,976
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 506
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: permision in www folder

 
0
  #8
Dec 1st, 2008
use chmod
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,176
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: permision in www folder

 
0
  #9
Dec 2nd, 2008
Originally Posted by veledrom View Post
Ok. In the properties of www directory, it permites only root and it is not enabled. Also, there is not other option to let me add my user. How do i do it?

you need to run the chmod command or the chown as root, or using sudo whichever is more viable option for you. Also needless to say, it has to be done in the terminal and cannot be modified via the GUI. (Unless your distribution permits the root user to login via the GUI)
Last edited by stephen84s; Dec 2nd, 2008 at 1:56 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 73
Reputation: lio04 is an unknown quantity at this point 
Solved Threads: 4
lio04's Avatar
lio04 lio04 is offline Offline
Junior Poster in Training

Re: permision in www folder

 
0
  #10
Dec 11th, 2008
Jabber: lio(at)jabbim(dot)sk
Sorry for my English, I am only an autodidact.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Getting Started and Choosing a Distro Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC