Jump to content


Photo

what is CHMOD?????


  • Please log in to reply
11 replies to this topic

#1 skroks609

skroks609
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 08 August 2006 - 10:07 AM

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.
All windows computers will crash in 2057
Or will they??...

#2 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 08 August 2006 - 10:10 AM

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

#3 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 08 August 2006 - 10:10 AM

CHMOD is permission settings, usually setting it to 0777 or 777.
Edit: this is usually to write a new file.

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


#4 skroks609

skroks609
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 08 August 2006 - 10:11 AM

thanx but i dont use ftp...
All windows computers will crash in 2057
Or will they??...

#5 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 08 August 2006 - 10:12 AM

what do you use?

#6 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 08 August 2006 - 10:13 AM

yeah wat do u use?

#7 skroks609

skroks609
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 08 August 2006 - 10:14 AM

i use freewebs browser upload.....
All windows computers will crash in 2057
Or will they??...

#8 skroks609

skroks609
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 08 August 2006 - 10:18 AM

o.O i only started php last week so i dont understand simple questions....
All windows computers will crash in 2057
Or will they??...

#9 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 08 August 2006 - 10:18 AM

:/ i didn't think freewebs allowed php.

#10 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 08 August 2006 - 10:19 AM

well anyway
CHMOD is the Permission Settings of a file or directory.

#11 skroks609

skroks609
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 08 August 2006 - 10:20 AM

oops sorry i meant ripway.com browser upload  :-[
All windows computers will crash in 2057
Or will they??...

#12 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 August 2006 - 12:54 PM

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:
<?php
phpinfo();
?>


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 this FAQ. 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:
chmod('filename.txt', 0777);

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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users