Jump to content

Archived

This topic is now archived and is closed to further replies.

skroks609

what is CHMOD?????

Recommended Posts

Ok so i now know the basics of writing text to a txt file. But i've been told that it wont work unless i chmod the file, and i have no idea how you do that. Please answer!

Thanx, SkRoks609.

Share this post


Link to post
Share on other sites
well im not sure but i think it is when u go into the ftp and right click on the file in question it comes up with some options that u must select or deselect depending on wat u want to do

Share this post


Link to post
Share on other sites
CHMOD is permission settings, usually setting it to 0777 or 777.
Edit: this is usually to write a new file.

i think this works:
[code=php:0]<?PHP
$filename = "page.php";
if(is_writable($filename))
{
die('Sorry $filename is not writable.');
}else{
die('$filename is writable');
}[/code]

Share this post


Link to post
Share on other sites
what do you use?

Share this post


Link to post
Share on other sites
:/ i didn't think freewebs allowed php.

Share this post


Link to post
Share on other sites
well anyway
CHMOD is the Permission Settings of a file or directory.

Share this post


Link to post
Share on other sites
First what is the servers OS your site is hosted off of, you can check this by creating a file called info.php and put this init:
[code=php:0]<?php
phpinfo();
?>[/code]


Now upload it to your site and run info.php. When you run that it generates a page full of info about php and your server. Look for the System row, it should be the first line. To the right of the System row text it should state the server OS. IF it states windows you dont have to worry about CHMOD permissions, as windows doesnt have CHMOD permissions. However if its *unix then you may need to chmod the text file.

To CHMOD the file you'll want to use FTP. You can use FTP with ripway by reading [url=http://ripway.com/help/kbase.asp?category_id=1&article_id=15]this FAQ[/url]. Once you have your FTP client logged in you need to navigate to your txt file then right click it and select Properties and there should be a CHMOD/File Permissions somewhere. Just tick all 9 boxes and click OK. You have just changed the permission of your file!

Additionally you can chnage file permissions with PHP with the chmod function. Just do this:
[code=php:0]chmod('filename.txt', 0777);[/code]

That will attempt to change the permissions of the file/folder specified.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.