Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,052 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,559 people online right now. Registration is fast and FREE... Join Now!




Chmod

2 Pages V  1 2 >  
Reply to this topicStart new topic

Chmod, ?

Koenie
21 Nov, 2002 - 05:16 AM
Post #1

What?!
*****

Joined: 8 Jul, 2002
Posts: 1,313

Can someone tell me how that CHMOD thing works, cause I dont understand shit of it.... Please?

Thanks, Koenie
User is offlineProfile CardPM
+Quote Post

arniie
RE: Chmod
21 Nov, 2002 - 05:33 AM
Post #2

D.I.C Addict
****

Joined: 8 Oct, 2002
Posts: 999

chmod
User is offlineProfile CardPM
+Quote Post

Koenie
RE: Chmod
21 Nov, 2002 - 05:56 AM
Post #3

What?!
*****

Joined: 8 Jul, 2002
Posts: 1,313

Ok, let me explain it a bit more:

I have a simple .txt file and I want people to be able to write text to it, with a PHP script. What should I chmod it to then?

Koenie
User is offlineProfile CardPM
+Quote Post

Amadeus
RE: Chmod
21 Nov, 2002 - 07:07 AM
Post #4

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 12,226



Thanked: 37 times
Dream Kudos: 25
My Contributions
QUOTE(Koenie @ Nov 21 2002, 09:56 AM)
Ok, let me explain it a bit more:

I have a simple .txt file and I want people to be able to write text to it, with a PHP script. What should I chmod it to then?

Koenie

777 will give everyone read write and execute permissions on that file. If you want to make some restrictions, you'll have to specify what they are to find the right chmod().
User is online!Profile CardPM
+Quote Post

skyhawk133
RE: Chmod
21 Nov, 2002 - 07:08 AM
Post #5

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 14,926



Thanked: 47 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
755

that will make it read-write-execute by the server, read-execute by the world and group.

You don't have to understand that yet... but 755 is what it needs to be... if 755 don't work... do 777
User is online!Profile CardPM
+Quote Post

skyhawk133
RE: Chmod
21 Nov, 2002 - 07:10 AM
Post #6

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 14,926



Thanked: 47 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
To change it, you need to get an FTP program that supports CHMODing
Try http://www.smartftp.com

Then, right click the file (this works in most FTP programs) and select CHMOD and change it to 777 or 755
User is online!Profile CardPM
+Quote Post

Koenie
RE: Chmod
21 Nov, 2002 - 07:11 AM
Post #7

What?!
*****

Joined: 8 Jul, 2002
Posts: 1,313

Can I change it somewhere on my GuardianHosting account?
User is offlineProfile CardPM
+Quote Post

skyhawk133
RE: Chmod
21 Nov, 2002 - 07:12 AM
Post #8

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 14,926



Thanked: 47 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
ummm
yes... but not easily... get a good FTP program smile.gif SmartFTP is what the crew here at d.i.c uses cause it frigging rocks.
User is online!Profile CardPM
+Quote Post

Koenie
RE: Chmod
21 Nov, 2002 - 07:13 AM
Post #9

What?!
*****

Joined: 8 Jul, 2002
Posts: 1,313

ok thanks, I'll try that.

Wich one should I download?
User is offlineProfile CardPM
+Quote Post

skyhawk133
RE: Chmod
21 Nov, 2002 - 07:16 AM
Post #10

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 14,926



Thanked: 47 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
I downloaded the full one, instead of the installer... just seemed to go smoother.
User is online!Profile CardPM
+Quote Post

gneato
RE: Chmod
21 Nov, 2002 - 02:15 PM
Post #11

<title>Untitled Document</title>
*****

Joined: 3 Sep, 2001
Posts: 1,311

QUOTE(skyhawk133 @ Nov 21 2002, 09:08 AM)
755

that will make it read-write-execute by the server, read-execute by the world and group.

You don't have to understand that yet... but 755 is what it needs to be... if 755 don't work... do 777

Um, no actually

755 = read/write/execute for the owner of the file (which is not httpd), and read/execute for everyone else.

It's better to keep it *not* executable... what you need is chmod 666.
644 won't work, because apache/php isn't the owner of the file. 664 may or may not work, depending on the server's configuration... 666 will be read/write able to owner, group, and world.

Note: some hosts run apache/php as your username, this config is best because you can then chmod files 600 and they will be accessible only by you and your scripts.

most hosts, including guardian, run apache/php as the user httpd.


did that make any sense?
User is offlineProfile CardPM
+Quote Post

Koenie
RE: Chmod
22 Nov, 2002 - 04:10 AM
Post #12

What?!
*****

Joined: 8 Jul, 2002
Posts: 1,313

I used 777 and it works
User is offlineProfile CardPM
+Quote Post

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 05:39PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month