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? 5 1553
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. js*******@attgl obal.net
=============== ===
On Mar 29, 10:24 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
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...@attgl obal.net
=============== ===- Hide quoted text -
- Show quoted text -
Thank you Jerry. By changing the owner to apache I was able to write.
How does one change the owner?
I am learning PHP, and bought some scripts from BestWebForms.co m, 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" <jr*****@gmail. comwrote:
>On Mar 29, 10:24 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>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...@attg lobal.net ============== ====- Hide quoted text -
- Show quoted text -
Thank you Jerry. By changing the owner to apache I was able to write.
George Matthew Dareos wrote:
How does one change the owner?
I am learning PHP, and bought some scripts from BestWebForms.co m, 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. js*******@attgl obal.net
=============== ===
"George Matthew Dareos" <gDareos @ laLouisianewrot e in message
news:uc******** *************** *********@4ax.c om...
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.co m, 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...w hy would you buy a script from anyone?!!!
i think jerry gave you enough info on what to do...now go RTFM...or freaking
google. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: deko |
last post by:
Do I need to use flock() when reading a file into an array? It's possible that
the file in question could be open at the time the file('filename') request is
made. I realize flock() is required when opening a file with fopen() when there
is contention for the file:
$fp=fopen($ctr, 'w');
//only write if we can get lock on file
if (flock($fp, LOCK_EX))
{
fwrite($fp, "0");
|
by: Phil Powell |
last post by:
print_r(is_file("$logPath/$logFileName")); // RETURNS 1
unlink("$logPath/$logFileName"); // RETURNS WARNING: PERMISSION DENIED
This code should tell me that the file located at
$logPath/$logFileName should delete the log file, however, it never
deletes it due to permissions error.
However, upon checking the file properties I find this:
|
by: Fran Tirimo |
last post by:
I am developing a small website using ASP scripts to format data retrieved
from an Access database. It will run on a Windows 2003 server supporting
FrontPage extensions 2002 hosted by the company 1&1 with only limited server
configuration via a web based control panel.
My query relates to the ASP security model and how it relates to FrontPage
options for setting file access on a database file. If you know of any
online documentation...
|
by: Fran Tirimo |
last post by:
I am developing a small website using ASP scripts to format data retrieved
from an Access database. It will run on a Windows 2003 server supporting
FrontPage extensions 2002 hosted by the company 1&1 with only limited server
configuration via a web based control panel.
My query relates to the ASP security model and how it relates to FrontPage
options for setting file access on a database file. If you know of any
online documentation...
|
by: David Thielen |
last post by:
Hi;
My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a
subdirectory to display as part of the created page. However, the bitmap will
not display due to a security violation.
Everything is the default settings I believe. IIS is running under Local
System. In IIS the DefaultAppPool is running under Network Service.
Annonymous access uses the account IUSR_JASMINE (machine name is Jasmine).
| |
by: John Salerno |
last post by:
I always read about how you need to set certain file permissions (for
cgi files, for example), but it's never been clear to me *how* you do
this. I know you can run the line
chmod 755 scriptname.py
but *where* do you run this? Is this done on your personal system, or on
the server? What if you are using Windows? If it's done on the server,
how do you do it?
|
by: sprash |
last post by:
Newbie question:
I'm trying to determine if a file physically exists regardless of the
permissions on it
Using File.Exists() returns false if it physically exists but the
process does not have the necessary permissions.
One hack could be to check for length and that would throw a
FileNotFoundException ...but there is got to be a better way!
|
by: Tim Payne |
last post by:
I have an odd permissions issue with uploading files to a windows 2003
server.
I have a reasonably unusual setup. We have a php website, running through
IIS that was written to use mod_rewrite. Obviously, this doesn't exist in
IIS, so as a workaround, I have the .net isapi dll as a wildcard handler for
the site, with the rewriting done by .net, which then passes the processng
back to the php pages. So far so good.
When I attempt to...
|
by: chrisj |
last post by:
I'm using freeASPupload and got some assistance integrating to a Member script. It works successfully.
In this modified version there are two groups that use this upload script. Members of one group get automatically re-directed after uploading.
However, this member group never gets the benefit of knowing if they've uploaded an incorrect file size or incorrect file extension.
Members from the second group do see the "exceeds max file...
|
by: beary |
last post by:
Hello everyone,
I posted this in unix/linux but it received no replies, so I assume it was the wrong forum. I'm trying here.
I'm in way over my head with file permissions. The directory and files are sitting on a linux server. I know almost nothing about linux.
The background: I was given a web share by my IT admin. Initially, the web share had 3 users, myself (as the owner) ,root (the group) and everyone. I could copy and paste from my...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |