Google Answers Logo
View Question
 
Q: Default SFTP permissions in Google ( No Answer,   5 Comments )
Question  
Subject: Default SFTP permissions in Google
Category: Computers > Internet
Asked by: davert2-ga
List Price: $15.00
Posted: 31 May 2004 14:22 PDT
Expires: 03 Jun 2004 10:48 PDT
Question ID: 354388
Using Debian Linux, and the sftp facilities built into SSH, how can I
set up the root (or other users) so that files are, by default, set to
be owned by www-data, group www-data, and either 644 or 755 access? At
the moment files are uploaded as 700 and I've tried changing umask in
the profile. Thanks.

Clarification of Question by davert2-ga on 02 Jun 2004 07:59 PDT
Raised the list price.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Default SFTP permissions in Google
From: bytecaptain-ga on 02 Jun 2004 23:17 PDT
 
Hello Davert2-ga,

I don't have a debian installation just yet but my ftp server is on
suse and there are a few things in common. If there is a default sftp
setting it should appear in the sftpd.conf file, perhaps somewhere in
/etc? The version I use is vsftp and has an associated vsftpd.conf
file which allows the permissions to be set however you want. There
may be something similar with your version as well as a man page for
sftpd.conf.

good luck.

ByteCaptain
Subject: Re: Default SFTP permissions in Google
From: bytecaptain-ga on 02 Jun 2004 23:26 PDT
 
almost forgot, if you wanted to do this through ssh you're going to
need to edit the configuration file sshd uses when started by( &&
assuming you're using) xinetd or inetd. You'll be looking for the line
that says something like /usr/sbin/sshd -f [config-file-name]. If
you're starting the daemon by hand you'll already be familiar with the
previous command.
Subject: Re: Default SFTP permissions in Google
From: davert2-ga on 03 Jun 2004 05:43 PDT
 
Thank you. sftp is part of ssh as you noted - there's no separate
sftpd.conf or sftp.conf (or for that matter vsftpd.conf). I did
already go through  /etc/ssh/sshd_config and did not find anything
relevant. So we're still at square one.
Subject: Re: Default SFTP permissions in Google
From: davert2-ga on 03 Jun 2004 09:58 PDT
 
Here's a new wrinkle: the problem seems to occur primarily in one
particular directory associated with one domain name. There's no
.htaccess file there. In another directory, the default is 777! This
is using the same username.

And a new question to go along with the first: any way to assign
default ownership to files uploaded by sftp?
Subject: Re: Default SFTP permissions in Google
From: davert2-ga on 03 Jun 2004 10:48 PDT
 
Uh. Duh. I found the issue. My *local* permissions were wrong. The
sftp program was simply copying local permissions. I went crazy trying
to find this. I'm closing the question with this comment as a guide to
anyone else...

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy