Locking down access vi winscp


 
Thread Tools Search this Thread
Operating Systems AIX Locking down access vi winscp
# 1  
Old 10-23-2015
Locking down access vi winscp

Did some search but didn't find what I was looking for. We have a fairly complex system in which we have a special shell that is actually a script that runs some checks to make sure the user is coming in via the approved ssh client and if not they are kicked out.
Recently we figured out folks are coming in via winscp and it would appear that winscp does not follow the same rules so the special script not getting invoked and blocking them.
Does users coming in via winscp run the .profile for a given user?

I thought I knew AIX pretty well but this is beyond me at this point.
So users are coming in through winscp and accessing areas that they should not be in. Those areas are more open than they should normally but user when logging in normally don't get shell access they are forced into a program so the areas of concerns were never accessible to them. It's really an application issue that is causing those sensitive areas to be open like they are so they can't be locked down at the file/directory level.

Is anyone aware of a way to lock a user down into their home directory when using tools like winscp? We use chroot type security on our linux "FTP". But not sure how putting chroot type security on this AIX server might affect normal enduser logins to the application that resides on this server as when they come in like they should the application is the one accessing the other sensitive areas and is not allowing the user to access areas that don't belong to them.

Thanks for your time.
Justin
# 2  
Old 10-23-2015
Do these users even have permissions to access folders beyond the one they're supposed to chroot into? There are many ways around the application, probably, but no way around the operating system.

Last edited by Corona688; 10-23-2015 at 07:54 PM..
# 3  
Old 10-25-2015
Do you want that your users still be able to use scp/sftp or you don't need these tools? If you don't need them, it is easy to switch them off and there is nothing AIX-specific in it.
# 4  
Old 10-26-2015
Quote:
Originally Posted by juredd1
Is anyone aware of a way to lock a user down into their home directory when using tools like winscp? We use chroot type security on our linux "FTP". But not sure how putting chroot type security on this AIX server might affect normal enduser logins to the application that resides on this server as when they come in like they should the application is the one accessing the other sensitive areas and is not allowing the user to access areas that don't belong to them.

Thanks for your time.
Justin
Here is a small example how to setup a restricted shell:

1. Make sure rksh is in the list of valid shells.
Code:
grep rksh /etc/security/login.cfg

2. Change users shell to rksh.
Code:
chsh <user> /usr/bin/rksh

3. Prepare your environment (create for every allowed command a symbolic link)
Code:
mkdir /usr/bin/restricted
ln -s /usr/bin/ls /usr/bin/restricted/ls
ln -s /usr/bin/cat /usr/bin/restricted/cat
...

4. Replace the PATH-variable in users .profile file and fit the environment settings for your applications.
Code:
export PATH=/usr/bin/restricted

5. Adjust the permissions
Code:
chown bin:bin /home/<user> /home/<user>/.profile
chmod -w /home/<user> /home/<user>/.profile

6. Test it.
Code:
$ cd /
rksh: cd: 0403-019 The operation is not allowed in a restricted shell.

Works well with winscp.

Regards
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Putty and winscp - what is the difference?

Want to understand the difference between putty and winscp. thanks in advance (2 Replies)
Discussion started by: swathi123
2 Replies

2. UNIX for Dummies Questions & Answers

What is winscp?

Hi I am new to using unix and editors for unix.. what is winscp? how to use it? what are ways to download this and learn? (1 Reply)
Discussion started by: swathi123
1 Replies

3. AIX

WINSCP Log in AIX 6.1

Hello Team, In my environment , Application team using winscp to create/modify/delete the files in the AIX server from their windows boxes. I have enabled the user history, su logs and lastlog, but the users whoever using winscp its not getting tracked. How to enable the WINSCP logs in AIX... (3 Replies)
Discussion started by: gowthamakanthan
3 Replies

4. AIX

winscp between AIX and windows

Hello Admins, I am trying to copy some files/packages from my windows host to AIX server. I am a normal user not root. I am getting an error as below: cannot initialize sftp protocol..... I have enabled the ftp service. Could you help me out.. (7 Replies)
Discussion started by: snchaudhari2
7 Replies

5. AIX

File access issue through sftp/winscp

Hi, I have SSH where I want to restrict browsing for a user "drrep" to the assigned home directory only.So I have put a entry in the sshd_config file as “AllowFiles "drrep:/fcrarch/fl02r/*" as shown in the scrren below. But due to this setting none of the users are able to login through winscp... (0 Replies)
Discussion started by: dwiravi
0 Replies

6. Linux

WINSCP for Linux?

Is there something that will work on Linux with the same functionality like Winscp? (5 Replies)
Discussion started by: soupbone38
5 Replies
Login or Register to Ask a Question