|
|
|
Next: PHP manual (site) and __methods?
|
| Author |
Message |
External

Since: Mar 29, 2007 Posts: 6
|
(Msg. 1) Posted: Thu Mar 29, 2007 6:52 am
Post subject: File Permissions Archived from groups: comp>lang>php (more info?)
|
|
|
I am trying to get a script to modify a file on my linux system. The
file is located in /etc/squid
6997741 12 -rw-r--r-- 1 root root 8458 Mar 29 08:05 sites
I found a script that will open the file in a text field and I can add
a new entry at the bottom. However when I try to write the file I get
a error.
To test I did a chmod 777 on the sites file and my php script worked
fine. But I am not suppose to leave this file with this type of
premissions.
What is the best thing to do to resolve this? |
|
| Back to top |
|
 |  |
External

Since: Mar 29, 2007 Posts: 6
|
(Msg. 2) Posted: Thu Mar 29, 2007 7:35 am
Post subject: Re: File Permissions Archived from groups: per prev. post (more info?)
|
|
|
On Mar 29, 10:24 am, Jerry Stuckle <jstuck... RemoveThis @attglobal.net> wrote:
> theGerm wrote:
> > I am trying to get a script to modify a file on my linux system. The
> > file is located in /etc/squid
>
> > 6997741 12 -rw-r--r-- 1 root root 8458 Mar 29 08:05 sites
>
> > I found a script that will open the file in a text field and I can add
> > a new entry at the bottom. However when I try to write the file I get
> > a error.
>
> > To test I did a chmod 777 on the sites file and my php script worked
> > fine. But I am not suppose to leave this file with this type of
> > premissions.
>
> > What is the best thing to do to resolve this?
>
> Your problem is the file is not owned by the webserver's userid.
>
> Changing permissions to 777 is dangerous, as you well know. It's much
> better to change the owner to the webserver's userid and allow only the
> webserver to access it. A secondary option would be to put the
> webserver's userid in the group that owns the file, but that's not as
> secure.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck... RemoveThis @attglobal.net
> ==================- Hide quoted text -
>
> - Show quoted text -
Thank you Jerry. By changing the owner to apache I was able to write. |
|
| Back to top |
|
 |  |
External

Since: Jul 08, 2004 Posts: 3787
|
(Msg. 3) Posted: Thu Mar 29, 2007 10:24 am
Post subject: Re: File Permissions Archived from groups: per prev. post (more info?)
|
|
|
theGerm wrote:
> I am trying to get a script to modify a file on my linux system. The
> file is located in /etc/squid
>
> 6997741 12 -rw-r--r-- 1 root root 8458 Mar 29 08:05 sites
>
> I found a script that will open the file in a text field and I can add
> a new entry at the bottom. However when I try to write the file I get
> a error.
>
> To test I did a chmod 777 on the sites file and my php script worked
> fine. But I am not suppose to leave this file with this type of
> premissions.
>
> What is the best thing to do to resolve this?
>
Your problem is the file is not owned by the webserver's userid.
Changing permissions to 777 is dangerous, as you well know. It's much
better to change the owner to the webserver's userid and allow only the
webserver to access it. A secondary option would be to put the
webserver's userid in the group that owns the file, but that's not as
secure.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex.DeleteThis@attglobal.net
================== |
|
| Back to top |
|
 |  |
External

Since: Nov 07, 2007 Posts: 1
|
(Msg. 4) Posted: Wed Nov 07, 2007 4:37 pm
Post subject: Re: File Permissions Archived from groups: per prev. post (more info?)
|
|
|
How does one change the owner?
I am learning PHP, and bought some scripts from BestWebForms.com, and
they work great on web accounts hosted by Omnis.com and
NetStarTel.com, but I can't get them to work on accounts hosted by
Fatcow or Godaddy.
I tried to get help from the PHP script vendor, but they just said
they'd had some problems with Fatcow sites, but I'm on my own.
Any help would be appreciated,
Thanks,
George
On 29 Mar 2007 07:35:10 -0700, "theGerm" <jrmontg.TakeThisOut@gmail.com> wrote:
>On Mar 29, 10:24 am, Jerry Stuckle <jstuck....TakeThisOut@attglobal.net> wrote:
>> theGerm wrote:
>> > I am trying to get a script to modify a file on my linux system. The
>> > file is located in /etc/squid
>>
>> > 6997741 12 -rw-r--r-- 1 root root 8458 Mar 29 08:05 sites
>>
>> > I found a script that will open the file in a text field and I can add
>> > a new entry at the bottom. However when I try to write the file I get
>> > a error.
>>
>> > To test I did a chmod 777 on the sites file and my php script worked
>> > fine. But I am not suppose to leave this file with this type of
>> > premissions.
>>
>> > What is the best thing to do to resolve this?
>>
>> Your problem is the file is not owned by the webserver's userid.
>>
>> Changing permissions to 777 is dangerous, as you well know. It's much
>> better to change the owner to the webserver's userid and allow only the
>> webserver to access it. A secondary option would be to put the
>> webserver's userid in the group that owns the file, but that's not as
>> secure.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck....TakeThisOut@attglobal.net
>> ==================- Hide quoted text -
>>
>> - Show quoted text -
>
>Thank you Jerry. By changing the owner to apache I was able to write. |
|
| Back to top |
|
 |  |
External

Since: Oct 11, 2006 Posts: 592
|
(Msg. 5) Posted: Wed Nov 07, 2007 4:49 pm
Post subject: Re: File Permissions Archived from groups: per prev. post (more info?)
|
|
|
"George Matthew Dareos" <gDareos @ laLouisiane> wrote in message
news:ucf4j39q5h4pds59h88e5nmp8339fu3mjk@4ax.com...
> How does one change the owner?
one finds out the OS, then one finds the appropriate usenet group for that
OS.
> I am learning PHP, and bought some scripts from BestWebForms.com, and
> they work great on web accounts hosted by Omnis.com and
> NetStarTel.com, but I can't get them to work on accounts hosted by
> Fatcow or Godaddy.
which means great for everyone else, but you. why would you buy as script
from anyone?!!! especially if you are learning php? got money to burn?
> I tried to get help from the PHP script vendor, but they just said
> they'd had some problems with Fatcow sites, but I'm on my own.
which underscores...why would you buy a script from anyone?!!!
i think jerry gave you enough info on what to do...now go RTFM...or freaking
google. |
|
| Back to top |
|
 |  |
External

Since: Jul 08, 2004 Posts: 3787
|
(Msg. 6) Posted: Wed Nov 07, 2007 5:45 pm
Post subject: Re: File Permissions Archived from groups: per prev. post (more info?)
|
|
|
George Matthew Dareos wrote:
> How does one change the owner?
>
> I am learning PHP, and bought some scripts from BestWebForms.com, and
> they work great on web accounts hosted by Omnis.com and
> NetStarTel.com, but I can't get them to work on accounts hosted by
> Fatcow or Godaddy.
>
>
> I tried to get help from the PHP script vendor, but they just said
> they'd had some problems with Fatcow sites, but I'm on my own.
>
> Any help would be appreciated,
>
> Thanks,
> George
You'll need to ask your hosting company. There are several different
ways of doing it, depending on the control panel (or lack thereof) they
use, user names, etc. And I haven't used either Fatcow or GoDaddy web
servers.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex.TakeThisOut@attglobal.net
================== |
|
| Back to top |
|
 |  |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|