perl/cgi on UNIX, just like the old days
sign...
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
cgi on Cobalt RaQ
Collapse
X
-
Guest replied -
Guest repliedchown and chmod
chown and chmod change the file permission information on files.
chmod changes the access rules to the file (who has read, write and execute access to the file). Permissions are set on three levels, the individual user who owns the file, the group of users that own the file and everyone else. Chmod 777 gives everyone read, write and execute access to a file chmod 400 gives the owner of the file (and only the owner of the file) read access only.
Chown allows you to change the owner of the file. chown ben script.cgi changes the owner of script.cgi to the user ben (if he exists).
For a script to run on unix (be it a cgi program or anything else you want to run) you need to ensure that the user who wants to run the file has executable rights to it (say by entering chmod 755 script.cgi on the command line).
Furthermore there is a weird issue with the httpduser on cobalt and files owned by the admin / root users. The easiest solution I've used is to telnet or ssh into the server as admin, change user to root, create another user and chown any cgi scripts on the server to that user).Leave a comment:
-
Guest repliedchown
usage
chown [:] filespec
(bet the board screws that up)
chown fredeople myfil*
will change the files matching myfil* to be owned by user fred and the owning group set to people
if the file was originally
-rwxr-wr-w jon staff myfile1
ls -l will then give
-rwxr-xr-x fred people myfile1
In this case I think eek is saying that the best user to own the scripts is user httpdthe and group httpddaemon (or vv)Leave a comment:
-
Guest repliedRe: Its a permissions issue
Eek - thanks very much for your comment, but being a complete ignoramus in this area I don't really understand what chowning the script or h..ding the h..daemon really means - can you elaborate a bit?Leave a comment:
-
Guest repliedIts a permissions issue
Cobalt treat the admin user as a junior root. Best solution is simply to chown the script to someone else (or httpdthe httpddaemon) and everything will be fine.Leave a comment:
-
Guest repliedRe: Come on xogoth - we are all on tenterhooks !
Mark - have had a bit of a fiddle but no joy yet.Have not really had much time due to work (ech!) - nothing much for weeks and now I've got a major re-write and full retest to do by yesterday - may actually earn a whole 2k this month at this rate! Will let you know when get back to it.Leave a comment:
-
Guest repliedCome on xogoth - we are all on tenterhooks !
Is it working yet - what was the problem ?Leave a comment:
-
Guest repliedRe: RE:cgi on Cobalt RaQ
curious, why would the file extension make any difference? Surely, this, as I pointed out already, is UNIX and the interpreter loaded is really going to depend on the shell magic ? And, I see that the cgi has the exec magic.
Are you thinking of windoze and some weird file association thing from the registry?Leave a comment:
-
Guest repliedRE:cgi on Cobalt RaQ
Sorry about the previouse. Bugger, this technology
Try swapping your script extensions
PL > CGI or
CGI > PLLeave a comment:
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Leave a comment: