D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] Re: Permissions



Hi neil and All

Changed this one to permissions. The first problem I have is that I am using a graphical input to ftp. I am using terminal but am unsure of the commands to use to query for permissions. I tried Matt's " chmod 777 foldername " but all I got was, access not allowed.

Using a graphical interface I find that all permissions are set to read only for all folders and files. I use two ftp programmes. The first advises me that files are set for read only, the second advises me that the folder is 'owner 56435' and 'group 510' with all read/write/execute boxes ticked.

Here is UKLInux response to the problem:-

I'm sorry I've never seen this program before and havent got a clue. The
directory is set to 777.

We cannot support individual programs perhaps you should contact the
author of the program for support on it

He's probably got a point. It's just not that helpful.

I will try and find a non-gui ftp programme to see if that can help.

Rich
www.littlebigfoot.org.uk
"How beautiful on the mountains are the feet of the messenger bringing good news." Isaiah 52 v 7 (The Message)


On 4 Oct 2004, at 21:04, Neil Williams wrote:

On Monday 04 October 2004 8:05 pm, Richard Brown wrote:

Richard, which program are you using to set the permissions? FTP?

Use a GUI FTP client like gFTP that shows you two windows, one for the local
filesystem and one for the remote - this will allow you to see all the files
and all the permissions on both sites at the same time.


Thanks for the speedy response. I went and did what was suggested and
got the response, "No Way!" Well that was what it was saying basically.

Richard, if anyone is to help you, you need to offer the accurate message, not
an exaggerated version. What, exactly, did you do and what precisely was the
output? GUI FTP programs have a log window - can you post the relevant
section of the log please?


So I checked all my other files and discovered that they are all read
only.

What, exactly, do you mean - what are the permissions?
drwxr-xr-x readable by anyone, writeable only by the user, not a script
dr-xr-xr-x readable by anyone, not writeable (except if forced)
drwxrwxrwx readable and writeable by anyone with access to the server - this
is what will allow a script to modify content.


Files would normally be:
-rw-r--r-- usual permissions for user files. 644, writeable by user, readable
by everyone.
-rw-rw-rw- readabe and writeable by everyone.
-rwx-r-x-r-x usual permissions for an executable script, 755. This should NOT
be set for anything except an executable script, bash, perl, etc.


All directories are indicated by a d at the start of the permissions line and
in order for any process to read the directory (or anything below that
directory) that process must have execute permissions on the directory.
That's why directories show up as drwxr-xr-x, every user has an x for
executable. Directories and scripts should be x, ordinary files should not.


In e.g. gFTP, you right click the file in the remote list and select chmod
then set the permissions.


If you have shell access, use SSH to connect to the box and issue the chmod
777 dirname command directly.


If you get permission errors, your server may be badly configured - you should
be able to change the permissions of any file in your account directory.


For regular files created by a script run in Apache, you'll find the file
owned by www-data or the user 'nobody'. You can transfer it to your ownership
because it's in your home folders. Use vi (in an SSH shell) and use the force
write command, :w! which will save the file and change the ownership. Then
run chmod 666 to allow the server script to update the file when it is next
run. Alternatively, using only FTP, retrieve the file from the remote server
to your local filesystem - this will create a file with you as owner. Delete
the file from the remote filesystem. Now upload the saved file - the file
will show with the changed permissions/owner. Again, use chmod via the FTP
client to change the file to chmod 666 so that the script can still access
the file.


--

Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/

http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3


--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.



Lynx friendly