Go Premium for a chance to win a PS4. Enter to Win


CHMOD and Perl

Posted on 1997-11-16
Medium Priority
Last Modified: 2010-05-19
In a few predefined scripts, people say that a file must be CHMODED 744 (or something like that) How do you CHMOD a file? (Where do I type it in- after a certain command, anywhere, etc, and how do you type it in?) (I know how to edit the files, just not how to use the CHMOD command.) Thanks.
Question by:mystery052997
  • 2
  • 2

Accepted Solution

alamo earned 300 total points
ID: 1208615
chmod is a Unix command which changes file permissions. If you are not running on a Unix (or Unix-derivative) system you probably don't need to worry about it. If you are on WinNT for example, ignore the rest of this :-)

For the full scoop, issue the command "man chmod", but here's the summary. You run the chmod command from the shell (command line), giving it the desired permissions filenames (or wildcard) to be changed. The three digits of the permissions  setting corresponds to your own rights, your group's rights, and other user's rights. 4=read, 2=right, 1=execute, and add them together for various combinations. So in the example, 744, that means you personally have read+write+execute permission on the file, and your group and others both have read only rights. There are various other commands to chmod that are a little easier to use than setting permissions with the number, the manual page explains those.

Hope this is what you needed - good luck!

Author Comment

ID: 1208616
I'm running Win 95, but when you go to the readme file on the WWWBoard at www.worldwidemart.com/scripts/, it says these files need to be CHMODED. I am getting an error when I try to run it. the URL is http://rampage.ml.org/users/~mystery/wwwboard/wwwboard.html, and when I submit something it says that the perl script has an error. I have followed the directions to the letter, except for CHMODing it. Do you think you could try it? If it doesn't work, could you please tell me how to CHMOD files, just in case?
LVL 85

Expert Comment

ID: 1208617
It does not appear to be a chmod problem, when I open
Somehing does seem to execute, returning:
HTTP/1.1 200 OK
Server: Netscape-Enterprise/3.0
Date: Sun, 16 Nov 1997 20:32:41 GMT
Content-type: text/html
Connection: close

<html><head><title>General Messageboard ERROR: No Name</title></head>
<body><center><h1>ERROR: No Name</h1></center>
You forgot to fill in the 'Name' field in your posting.  Correct it below and re-submit.  The necessary fields are: Name, Subject and Message.<p><hr size=7 width=75%><p>
<form method=POST action="http://rampage.ml.org/cgi-bin/~mystery/wwwboard/wwwboard.pl">
Name: <input type=text name="name" value="" size=50><br>
E-Mail: <input type=text name="email" value="" size=50><p>
Subject: <input type=text name="subject" value="" size=50><p>
<textarea COLS=50 ROWS=10 name="body">

Optional Link URL: <input type=text name="url" value="" size=45><br>
Link Title: <input type=text name="url_title" value="" size=50><br>
Optional Image URL: <input type=text name="img" value="" size=45><p>
<input type=submit value="Post Message"> <input type=reset>
<br><hr size=7 width=75%>
<center>[ <a href="#followups">Follow Ups</a> ] [ <a href="#postfp">Post Followup</a> ] [ <a href="http://rampage.ml.org/users/~mystery/wwwboard//wwwboard.html">General Messageboard</a> ] [ <a href="http://rampage.ml.org/users/~mystery/wwwboard//faq.html">FAQ</a> ]</center>


Expert Comment

ID: 1208618
There is no chmod on Win95, so it's impossible for you to do. Win95 doesn't have the sort of file security that could be causing your problem.

I tried that URL and got the same result... the problem is in your script configuration. The script runs up until the point where it thinks the message is ok and is about to save it, at which point it dies. This is almost certainly a path problem - are you certain you have the path to the messages correct in your   wwwboard.pl script? What about the other files it needs?

Author Comment

ID: 1208619
I got the script from Matt's Script archive. I must have configured it wrong. Please see my question entitled, "WWWBoard and Perl" (This time, I upped the point value, hoping that one of you will be able to find it out.) I'm just going to start over on the script.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question