<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tallsimon.com&#187; read</title>
	<atom:link href="http://www.tallsimon.com/tag/read/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tallsimon.com</link>
	<description>Tallsimon and his random stuff</description>
	<lastBuildDate>Sat, 05 Jun 2010 19:56:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>File permissions on unix servers for windows users</title>
		<link>http://www.tallsimon.com/webmonkey/file-permissions-on-unix-servers-for-windows-users/</link>
		<comments>http://www.tallsimon.com/webmonkey/file-permissions-on-unix-servers-for-windows-users/#comments</comments>
		<pubDate>Sat, 24 Nov 2007 17:44:24 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Webmonkey]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[CGI]]></category>
		<category><![CDATA[Change]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[htm]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[options]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[Permissions]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[rww]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webmaster]]></category>
		<category><![CDATA[world]]></category>

		<guid isPermaLink="false">http://vanlieshout.org.uk/simon/index.php/2007/11/file-permissions-on-unix-servers-for-windows-users/</guid>
		<description><![CDATA[Introduction
I learned about file permissions the hard way. I was trying to install and run CGI scripts on my newly-aquired unix server and was just using the cpanel file manager for some file management and a a browser for ftp.
So I tried to find out what 0777 and 0644 meant. And I ended up reading [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 12pt"><strong>Introduction</strong></span></p>
<p>I learned about file permissions the hard way. I was trying to install and run CGI scripts on my newly-aquired unix server and was just using the cpanel file manager for some file management and a a browser for ftp.</p>
<p>So I tried to find out what 0777 and <img src="http://vanlieshout.org.uk/simon/wp-content/uploads/2007/11/xp%2520properties_1.jpg" alt="FTP permission" align="right" border="0" height="428" width="368" />0644 meant. And I ended up reading about chmod and -rww and all sorts of things I wansn&#8217;t interested in.</p>
<p>So here&#8217;s help for non-geeks to change permissions using your normal browser and tick boxes.</p>
<p><span style="font-size: 12pt"><strong>What are permissions</strong></span></p>
<p><span style="font-size: 10pt">Permissions tell the server whether to allow the person who is trying to access a file or folder whether to allow them to <strong>read</strong>, <strong>write/modify</strong> or <strong>execute/run</strong> a file.</span></p>
<p><span style="font-size: 10pt">Their permission to do this depends on who they are- whether they are the <strong>owner/webmaster</strong>, part of a <strong>priveledged group</strong>, or just a <strong>normal web user</strong>.</span></p>
<p><span style="font-size: 10pt">So there are 9 options- three groups and three permission options for each group. Each permission can be either allowed or not.</span></p>
<p><span style="font-size: 10pt">There are various ways of recording/coding permissions. In the table below, the three-number code system is summarised with an example for a normal html web page:</span></p>
<table border="1">
<tr>
<td><strong>Group</strong></td>
<td>Can read</td>
<td>can write</td>
<td>can execute</td>
<td>normal file permissions</td>
</tr>
<tr>
<td><strong>Owner/user</strong></td>
<td><strong>4</strong>=can 0=cant</td>
<td><strong>2</strong>=can 0=cant</td>
<td>1=can <strong>0</strong>=cant</td>
<td><strong>read/write</strong> = 4+2+0 = <strong>6</strong></td>
</tr>
<tr>
<td><strong>Group</strong></td>
<td><strong>4</strong>=can 0=cant</td>
<td>2=can<strong> 0</strong>=cant</td>
<td>1=can <strong>0</strong>=cant</td>
<td><strong>read only</strong> = 4+0+0 = <strong>4</strong></td>
</tr>
<tr>
<td><strong>All users/world</strong></td>
<td><strong>4</strong>=can 0=cant</td>
<td>2=can <strong>0</strong>=cant</td>
<td>1=can <strong>0</strong>=cant</td>
<td><strong>read only</strong> = 4+0+0 = <strong>4</strong></td>
</tr>
<tr>
<td>typical settings</td>
<td><strong>everyone can read</strong></td>
<td><strong>only user can write</strong></td>
<td><strong>nobody can execute</strong></td>
<td>&nbsp;</td>
</tr>
</table>
<p><span style="font-size: 10pt">As you can see, <strong>644</strong> is normally the setting used for files on a unix server. This is when the owner can read and write to the file and anyone else can only read it. 644 is the sum of the numbers for read (4), write(2) and execute (1) options.</span></p>
<p><span style="font-size: 10pt">To give another example, some scripts require a log or cache file is writeable by all, thus the permissions matrix is as follows:</span></p>
<table border="1">
<tr>
<td><strong>Group</strong></td>
<td>read</td>
<td>write</td>
<td>execute</td>
<td>sum</td>
</tr>
<tr>
<td>owner/user</td>
<td>4</td>
<td>2</td>
<td>1</td>
<td><strong>7</strong></td>
</tr>
<tr>
<td>group</td>
<td>4</td>
<td>2</td>
<td>1</td>
<td><strong>7</strong></td>
</tr>
<tr>
<td>all users/world</td>
<td>4</td>
<td>2</td>
<td>1</td>
<td><strong>7</strong></td>
</tr>
</table>
<p><span style="font-size: 10pt">Finally, most folders should normally be set to 755 so that if there are files in the folder that need to be executed such as scripts etc, this can be done by anyone, but only the owner can put new files into the folder (write).</span></p>
<table border="1">
<tr>
<td><strong>Group</strong></td>
<td>read</td>
<td>write</td>
<td>execute</td>
<td>sum</td>
</tr>
<tr>
<td>owner/user</td>
<td>4</td>
<td>2</td>
<td>1</td>
<td><strong>7</strong></td>
</tr>
<tr>
<td>group</td>
<td>4</td>
<td>0</td>
<td>1</td>
<td><strong>5</strong></td>
</tr>
<tr>
<td>all users/world</td>
<td>4</td>
<td>0</td>
<td>1</td>
<td><strong>5</strong></td>
</tr>
</table>
<p><span style="font-size: 12pt"><strong>A very simple guide to using a browser to set permissions</strong></span></p>
<ol>
<li><span style="font-size: 10pt">Log on to the website. The address is in the format <a href="ftp://ftp.your-domain.com/" target="_blank">ftp://ftp.your-domain.com</a></span><span style="font-size: 10pt"> or <a href="ftp://user@&lt;a%20href=/" target="_blank">ftp.your-domain.com. A</a>&#8221; target=&#8221;_blank&#8221;&gt;ftp://user@<a href="ftp://ftp.your-domain.com.%20a/" target="_blank">ftp.your-domain.com. A</a> box will pop up where you enter your login name and password.</span></li>
<li><span style="font-size: 10pt">Upload or navigate to the folder or file you wish to modify the permissions of.</span></li>
<li><span style="font-size: 10pt">Right-click on the file or folder</span></li>
<li><span style="font-size: 10pt">Select &#8220;<strong>Properties</strong>&#8221; from the right-click menu (in windows). In unix select &#8220;CHMOD&#8221;</span></li>
<li><span style="font-size: 10pt">Change the permissions as you require by ticking the boxes. The box looks like the picture above</span></li>
<li><span style="font-size: 10pt">Click the &#8220;<strong>OK</strong>&#8221; button to complete.</span></li>
</ol>
<p><span style="font-size: 12pt"><strong>Advanced methods<br />
</strong></span><span style="font-size: 10pt">Without going into too much detail, on some systems, such as webservers, scripts are not allowed to run by default, and scripts are not allowed to create, change, or modify files or directories by default. As a webmaster, you have to explicitly allow such kind of access, and CHMOD is what you use to change these settings. The CHMOD function can be done using the command line (if you have such access to your webspace), but more easily, using your FTP client. Most good FTP programs have such a feature, and it is usually found using the context menus (right click menu). If you want a good FTP program, have a look at the </span><a href="http://ekstreme.com/digitalsmoke/freeware.php"><span style="font-size: 10pt">freeware page</span></a><span style="font-size: 10pt">. Additionally, most web servers have an online web-based file management program which allows you to modify permissions.</span></p>
<p><span style="font-size: 10pt">To use a <em>chmod</em> in a command-line program to change permissions of the file index.htm to 644, navigate to the correct folder on a unix server then enter</span></p>
<p><span style="font-size: 10pt; font-family: Terminal">chmod 644 index.htm </span></p>
<p><span style="font-size: 12pt"><strong>Alternate coding systems</strong></span></p>
<p><span style="font-family: Verdana">The permissions may also be coded with letters, as summarised below</span></p>
<table border="1">
<tr>
<td><strong>Group</strong></td>
<td>Can read</td>
<td>can write</td>
<td>can execute</td>
<td>normal file permissions</td>
</tr>
<tr>
<td><strong>Owner/user</strong></td>
<td><strong><span style="color: #ff0000">r </span></strong>=can &#8211; =cant</td>
<td><strong><span style="color: #ff0000">w</span></strong>=can -=cant</td>
<td>x=can <strong><span style="color: #ff0000">-</span></strong>=cant</td>
<td><strong>read/write</strong> =<strong> <span style="color: #ff0000">rw- </span></strong><span style="color: #000000">or<strong> 6</strong></span></td>
</tr>
<tr>
<td><strong>Group</strong></td>
<td><strong><span style="color: #ff0000">r</span> </strong>=can &#8211; =cant</td>
<td>w=can <strong><span style="color: #ff0000">-</span></strong>=cant</td>
<td>x=can <strong><span style="color: #ff0000">-</span></strong>=cant</td>
<td><strong>read only</strong> = <span style="color: #ff0000"><strong>r&#8211; </strong></span><span style="color: #000000">or<strong> 4</strong></span></td>
</tr>
<tr>
<td><strong>All users/world</strong></td>
<td><strong><span style="color: #ff0000">r</span> </strong>=can &#8211; =cant</td>
<td>w=can <strong><span style="color: #ff0000">-</span></strong>=cant</td>
<td>x=can <strong><span style="color: #ff0000">-</span></strong>=cant</td>
<td><strong>read only</strong> = <span style="color: #ff0000"><strong>r&#8211;</strong> </span><span style="color: #000000">or <strong>4</strong></span></td>
</tr>
<tr>
<td>typical settings</td>
<td><strong>everyone can read</strong></td>
<td><strong>only user can write</strong></td>
<td><strong>nobody can execute</strong></td>
<td>summary: <strong><span style="color: #ff0000">rw- r&#8211; r&#8211; </span><span style="color: #000000">or 644</span></strong></td>
</tr>
</table>
<p><span style="font-size: 12pt"><strong>Tips and tricks</strong></span></p>
<p><span style="font-size: 10pt">To keep files private for only you to read, the settings are <strong>600 </strong>(you can read or write, others cannot do anything) for a file or <strong>700</strong> for a folder or executable file. To allow others in the same group e.g. admin group to have the same permissions as you, the normal settings would be 664 rather than 644 for a file and 775 rather than 755 for a folder.</span></p>
<p><span style="font-size: 12pt"><strong>Summary</strong></span></p>
<p>You can change file permissions for various reasons, including hiding files from surfers or allowing CGIs to run guestbooks, content management programs etc.</p>
<p>You can edit permissions using command-line programs, FTP programs, browsers or online tools provided by your host.</p>
<p>Permissions may be displayed by numbers (e.g. 644), letters<span style="color: #000000"> (</span><span style="color: #000000">rw- r&#8211; r&#8211; ) or as 9 tick boxes.</span></p>
<p>To use your browser, simply go to the ftp address, right-click on the file you need, tick the boxes and click OK.</p>
<p>What could be easier?!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tallsimon.com/webmonkey/file-permissions-on-unix-servers-for-windows-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
