- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Permission change while copying from windows to Un...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2013 07:09 PM - last edited on 11-19-2013 11:22 PM by Maiko-I
11-19-2013 07:09 PM - last edited on 11-19-2013 11:22 PM by Maiko-I
Permission change while copying from windows to Unix
Hi Team
We are transferring a file from windows to Unix .
Method using for transferring the file:-
============================
From windows to Unix we made a passwordless sftp using a normal user ( for eg : A) .
sftp <file path > A@unix hostname:/<destination address> ====> this is the command which we ar using
My issue is we had given full permission for Everyone for the file in windows side . Once it reaches the Unix box the permission will become 600 . Actaully we need to get the permission as 644.
I had made the umask for that user A as 022 , After this also the permission of the file which i am copying is not getting changed .
If i am creating a file on Unix box as that user A then the permission of thata file is 644 .
So how can i get the permission 644 for all the files moving to that destination.
Regards
P.S. This thread has been moved from HP-UX > System Administration to HP-UX > networking. - Hp Forum Moderator
- Tags:
- sftp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2013 10:49 PM
11-19-2013 10:49 PM
Re: Permission change while copying from windows to Unix
>I had made the umask for that user A as 022
The user's umask isn't consulted when using rcp, ftp, scp, sftp access.
I assume there is some config file for the demons to set the default umask?
For ftp, there is a umask command.
For sftp, there is a lumask command but unfortunately that is for the local system.
I suppose you could use the chmod 644 command after your put and use -b for a batch file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2013 03:34 AM
11-20-2013 03:34 AM
Re: Permission change while copying from windows to Unix
For SFTP, the server-side default umask can be set on the Subsystem line of the sshd_config file (/opt/ssh/etc/sshd_config in HP-UX). Add the -u option and the desired umask value. For more information, see "man sftp-server".
The default Subsystem line should look similar to this in HP-UX:
Subsystem sftp /opt/ssh/libexec/sftp-server
To get umask 022 as a default for SFTP transfers, change it to:
Subsystem sftp /opt/ssh/libexec/sftp-server -u 022
With newish SSH versions, the same options will apply also if "internal-sftp" is used as a SFTP server instead of /opt/ssh/libexec/sftp-server.
If the umask is not explicitly set, each new incoming SFTP session will use whatever default umask is applied to new sessions by the PAM libraries. This may be different from the default umask set in /etc/profile and similar shell startup scripts. If the PAM libraries won't modify the umask, then the umask of the master sshd process will be inherited by the new sftp-server processes too.