I've been banging my head with this problem for two days, and I'm quite hopeless.
First of all, i would like to insist that no samba is involved.
I have a bunch of users whose home directory is /home/SFFS . Always. All of them. And they all belong to the group sffs.
Permissions of /home/SFFS look like this :
233360 drwxrwsr-x 3 root sffs 96 2009-12-12 16:03 . Notice that I have chmodded it to g+s.
1 - SSH only
When I set /bin/bash to be their shell, they can log in via ssh, add files, etc.
Permissions of files added via ssh are -rw-rw-r--, which is GOOD. I want that.
2 - FTP only
this is not very important, but users are not in the right directory (which is empty, so I cannot figure out which one it is). They cannot create anything. I'll live with it.
3 - SFTP - the weirder part.
when I set /usr/lib/sftp-server to be the user's shell, they can :
log in : yafc sftp://user@localhost/
list files
create new files
etc.
BUT (and this is my point) the files they create is set with permissions g-w !!! (more precisely, -rw-r--r--. So users cannot overwrite files created by others.
If I rerun sudo chmod g+ws on /home/SFFS, it will work, but this is not an option (trust me)
Since ssh works perfectly well, I assume the problem comes from vsftpd. Here are parts of my /etc/vsftpd.conf (I'm on ubuntu, if it changes anything) :
Sorry for the text wall. I really hope someone could figure this out.
++
I am somewhat confused. Do you want your users to be able to access this directory via sftp or via an vsftpd server? sftp and vfstp are completely different packages.
when I set /usr/lib/sftp-server to be the user's shell, they can :
i don't think you have to do this. from the sftp-server man page.
Quote:
DESCRIPTION sftp-server is a program that speaks the server side of SFTP protocol to
stdout and expects client requests from stdin. sftp-server is not in-
tended to be called directly, but from sshd(8) using the Subsystem op-
tion.
Command-line flags to sftp-server should be specified in the Subsystem
declaration. See sshd_config(5) for more information.
just set the user shell to bash or other shells that your environment allowed to be used. try to check umask settings and set it appropriately.
Hi All,
Apologies if this question has been asked before. I havent been able to resolve an issue and would like some help.
I am getting files pushed to me via sftp. The files once pushed to my server in folder ABC have -rw------- but I need these files to have the following -rw-rw---- to be... (1 Reply)
I needed to set up an sftp server for an external user to upload data for an internal developer.
What I did was created a chrooted user for the external guy, and then created an internal group with full permissions to that directory and then made the internal developer a member of that group so... (5 Replies)
hi guys,
i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not
and again i have to reverse sftp the files from unix to windows server.....
regards,
Vasa Saikumar. (13 Replies)
I had the below sftp script working perfectly but the problem is I am not able to send the echo statements .
#!/bin/sh
echo "Starting to sftp..."
sftp admin@myip << END_SCRIPT
cd /remotepath/
lcd /localpath/
mget myfiles*.csv
bye
END_SCRIPT
echo "Sftp successfully."
echo
echo... (11 Replies)
We have umask defined under /etc/.login as 022.
I have my user specific umask defined in /userhome/.login as 002.
I understand ftp will not execute anything at destination, it simply transfers files.
But it seem to be using 022 as umask for the files transferred. How does ftp knows what umask... (4 Replies)
Hello,
I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration.
#pwd... (8 Replies)
Hi,
I have situation where i need to automate transferring 10000+ files using sftp.
while read line
do
if ; then
echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt
fi
done< files.txt
sftp -b sftpCommand.txt stu@192.168.2.1
The above... (1 Reply)
Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Hi,
While I am trying SFTP my machine to another unix machine ,
it was working fine till 10 min back.
But now i am getting the below error
"Request for subsystem 'sftp' failed on channel 0"
Could you please someone help me to solve or analyise the root cause...
Cheers:b:,
Mahiban (0 Replies)
Hi,
I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory.
Thanks in advance.
Mike (3 Replies)