Re: [Dorset] FTP problem

2011-02-08 Thread Victor Churchill
On 8 February 2011 10:04, Tim xendis...@gmx.com wrote:

 I am running ubuntu 10.04LTS and have VSFTP installed, I can ftp to the local
 users home folder without a problem but I need to be able to ftp to the web
 servers  /var/www/myfolder When I try to ftp to the /var/www/myfolder I get
 critcal file transfer error (using Filezilla).

 I am guessing this is a user or group permission problem, at the
 moment /var/www/myfolder is owned by user root and group web, the local user
 (std user) is a member of the group web.  What permission should I change the
 folders and user to to get ftp access to the /var/www/myfolder (I am asking as
 I don't want to randomly start changing permission and cock it up).

If the ftp-user is in group web and the files are group-owned by web ,
then make the files group-writable and you should be fine.

cd /var/www/
chmod -R g+w myfolder

--
Next meeting:  Blandford Forum, Wednesday 2011-03-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://goo.gl/4Xue


Re: [Dorset] FTP problem

2011-02-08 Thread Tim
On Tuesday 08 February 2011 10:27:19 Victor Churchill wrote:
 On 8 February 2011 10:04, Tim xendis...@gmx.com wrote:
  I am running ubuntu 10.04LTS and have VSFTP installed, I can ftp to the
  local users home folder without a problem but I need to be able to ftp to
  the web servers  /var/www/myfolder When I try to ftp to the
  /var/www/myfolder I get critcal file transfer error (using Filezilla).
 
  I am guessing this is a user or group permission problem, at the
  moment /var/www/myfolder is owned by user root and group web, the local
  user (std user) is a member of the group web.  What permission should I
  change the folders and user to to get ftp access to the /var/www/myfolder
  (I am asking as I don't want to randomly start changing permission and
  cock it up).

 If the ftp-user is in group web and the files are group-owned by web ,
 then make the files group-writable and you should be fine.

 cd /var/www/
 chmod -R g+w myfolder

 --
 Next meeting:  Blandford Forum, Wednesday 2011-03-02 20:00
 Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
 How to Report Bugs Effectively:  http://goo.gl/4Xue

Thanks Victor, one stage closer but not quite there, I can now transfer a file 
by ftp to /var/www/myfolder but the permisson on that folder is -rw--- 
(600) rather than -rw-r--r-- (644) While I can change the permission via the  
ftp client is there a way to change the permission when the file lands in the 
folder automaticly??

Tim

--
Next meeting:  Blandford Forum, Wednesday 2011-03-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://goo.gl/4Xue


Re: [Dorset] FTP problem

2011-02-08 Thread Victor Churchill
On 8 February 2011 12:04, Tim xendis...@gmx.com wrote:
 Thanks Victor, one stage closer but not quite there, I can now transfer a file
 by ftp to /var/www/myfolder but the permisson on that folder is -rw---
 (600) rather than -rw-r--r-- (644)

I suspect you mean the permission on the file, rather than on the folder?

 While I can change the permission via the
 ftp client is there a way to change the permission when the file lands in the
 folder automaticly??

Not easily that i can thinkof OTTOMH. I'd feel inclined to suggest
that you loosen the file permissions before sending them over:

cd /home/myWebFiles
chmod -R g+r,o+r file...


-- 
best regards,

Victor Churchill,
Bournemouth

--
Next meeting:  Blandford Forum, Wednesday 2011-03-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://goo.gl/4Xue


Re: [Dorset] FTP problem

2011-02-08 Thread Ralph Corderoy

Hi Tim,

 Thanks Victor, one stage closer but not quite there, I can now
 transfer a file by ftp to /var/www/myfolder but the permisson on that
 folder is -rw--- (600) rather than -rw-r--r-- (644) While I can
 change the permission via the  ftp client is there a way to change the
 permission when the file lands in the folder automaticly??

See the local_umask configuration setting in vsftpd.conf(5);  default is
077.  Or better still use your FTP client to change the current umask on
the remote server after logging in.  That way it doesn't affect all
local users.  How to do that depends on your FTP client, but all good
ones should allow it.  If this is a regular upload you're doing, you
could script it as part of that.

Cheers,
Ralph.


--
Next meeting:  Blandford Forum, Wednesday 2011-03-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://goo.gl/4Xue


Re: [Dorset] FTP problem

2011-02-08 Thread John Carlyle-Clarke

On 08/02/11 12:23, Ralph Corderoy wrote:


Hi Tim,


Thanks Victor, one stage closer but not quite there, I can now
transfer a file by ftp to /var/www/myfolder but the permisson on that
folder is -rw--- (600) rather than -rw-r--r-- (644) While I can
change the permission via the  ftp client is there a way to change the
permission when the file lands in the folder automaticly??


See the local_umask configuration setting in vsftpd.conf(5);  default is
077.  Or better still use your FTP client to change the current umask on
the remote server after logging in.  That way it doesn't affect all
local users.  How to do that depends on your FTP client, but all good
ones should allow it.  If this is a regular upload you're doing, you
could script it as part of that.



You may also need to set g+x on the /var/www/myfolder and any sub 
folders to allow group members to cd into and list directories.


One easy way to do this might be to do chmod -R g=u /var/www/myfolder
This will set the group perms to be the same as the user perms on all 
files and directories.


You might also want to do chmod g+s /var/www/myfolder.  (You'd also 
want to do this on any already existing subdirectories, e.g. find 
/var/www/myfolder -type d -exec chmod g+s '{}' \;


Setting the suid bit like this on directories will make files and 
directories created under that folder inherit the group ownership of the 
parent.  This can be useful is you users belong to primary groups other 
than www and the FTP server doesn't allow you to specify the group 
used for file creation explicitly.


This will need to be done in conjunction with umask setup Ralph mentioned.


--
Next meeting:  Blandford Forum, Wednesday 2011-03-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://goo.gl/4Xue


Re: [Dorset] FTP problem

2011-02-08 Thread Alex Ross
Hi Tim,

If FTP is still giving you a headache, you could use SCP or SVN/GIT
revision control to roll out your changes to the server?

Regards,

Alex



On 8 February 2011 10:04, Tim xendis...@gmx.com wrote:

 I am running ubuntu 10.04LTS and have VSFTP installed, I can ftp to the local
 users home folder without a problem but I need to be able to ftp to the web
 servers  /var/www/myfolder When I try to ftp to the /var/www/myfolder I get
 critcal file transfer error (using Filezilla).

 I am guessing this is a user or group permission problem, at the
 moment /var/www/myfolder is owned by user root and group web, the local user
 (std user) is a member of the group web.  What permission should I change the
 folders and user to to get ftp access to the /var/www/myfolder (I am asking as
 I don't want to randomly start changing permission and cock it up).

 This web server is not public facing

 --
 Next meeting:  Blandford Forum, Wednesday 2011-03-02 20:00
 Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
 How to Report Bugs Effectively:  http://goo.gl/4Xue


--
Next meeting:  Blandford Forum, Wednesday 2011-03-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://goo.gl/4Xue

Re: [Dorset] FTP problem

2011-02-08 Thread Tim
On Tuesday 08 February 2011 12:40:04 John Carlyle-Clarke wrote:
 On 08/02/11 12:23, Ralph Corderoy wrote:
  Hi Tim,
 
  Thanks Victor, one stage closer but not quite there, I can now
  transfer a file by ftp to /var/www/myfolder but the permisson on that
  folder is -rw--- (600) rather than -rw-r--r-- (644) While I can
  change the permission via the  ftp client is there a way to change the
  permission when the file lands in the folder automaticly??
 
  See the local_umask configuration setting in vsftpd.conf(5);  default is
  077.  Or better still use your FTP client to change the current umask on
  the remote server after logging in.  That way it doesn't affect all
  local users.  How to do that depends on your FTP client, but all good
  ones should allow it.  If this is a regular upload you're doing, you
  could script it as part of that.

 You may also need to set g+x on the /var/www/myfolder and any sub
 folders to allow group members to cd into and list directories.

 One easy way to do this might be to do chmod -R g=u /var/www/myfolder
 This will set the group perms to be the same as the user perms on all
 files and directories.

 You might also want to do chmod g+s /var/www/myfolder.  (You'd also
 want to do this on any already existing subdirectories, e.g. find
 /var/www/myfolder -type d -exec chmod g+s '{}' \;

 Setting the suid bit like this on directories will make files and
 directories created under that folder inherit the group ownership of the
 parent.  This can be useful is you users belong to primary groups other
 than www and the FTP server doesn't allow you to specify the group
 used for file creation explicitly.

 This will need to be done in conjunction with umask setup Ralph mentioned.


 --
 Next meeting:  Blandford Forum, Wednesday 2011-03-02 20:00
 Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
 How to Report Bugs Effectively:  http://goo.gl/4Xue


Thanks all for your help, I used Ralph suggestion. There will only be two 
people 
maximum ftp-ing files over and that will be from a single account, this is only 
a small scale thing.  This is a new thing and will certainly be learning as the 
we go.

Thanks again

Tim

--
Next meeting:  Blandford Forum, Wednesday 2011-03-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://goo.gl/4Xue