- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to set permissions on ftp files ?
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
Forums
Discussions
Discussions
Discussions
Forums
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
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
тАО07-22-2003 06:41 AM
тАО07-22-2003 06:41 AM
If I connect to the unix server via FTP, and logon with my ID, how do I get any files that I bring over via FTP to take on permissions other than the default. In other words, can I set a umask type of thing for files that I create on the server via an FTP?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 06:45 AM
тАО07-22-2003 06:45 AM
Re: how to set permissions on ftp files ?
ftp umask xxxx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 06:46 AM
тАО07-22-2003 06:46 AM
Re: how to set permissions on ftp files ?
defusmask
man ftpaccess for more.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 06:47 AM
тАО07-22-2003 06:47 AM
Re: how to set permissions on ftp files ?
This can be set individual ftp groups, or a global umask.
If your using proftp, it also has a umask option, both global and per ftp group.
Doc's for ftpaccess, or proftp will both give examples for how to use the umask statement.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 06:47 AM
тАО07-22-2003 06:47 AM
Re: how to set permissions on ftp files ?
To establish a global 'umask' for 'ftp' add the '-u umask' argument to the daemon's startup in 'etc/inetd.conf':
# ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -u 022
By default, the umask value is 027. Having edited this file, restart the 'inetd' daemon:
# /usr/sbin/inetd -c
To establish a 'umask' on a specific base case, use the 'etc/ftpdftpaccess' mechanism. See the man pages for 'ftpaccess(4)' for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 06:51 AM
тАО07-22-2003 06:51 AM
Re: how to set permissions on ftp files ?
Two ways.
Globally:
In the ftp line of /etc/inetd.conf, put the following parm on the ftpd command
-u xxx where xxx=umask default is 027
Per user:
In /etc/ftpd/ftpaccess (you may have to create this file) you'd have a line that looks like
upload /home/user1 /path/to/upload/dir yes user1 group1 0666
This sets files to 666 for user1 who's primary group is group1. The /home/user1 specifies that user's home dir. Warning - when you use ftpacess you must make sure that you have a proper class statement so that you don't exclude other user's ability to ftp - see /usr/newconfig/etc/ftpd/ftpaccess for an example file.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 06:53 AM
тАО07-22-2003 06:53 AM
Re: how to set permissions on ftp files ?
modify the line in /etc/inetd.conf file
# ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -u 022
(this will set the umask 022 on every ftp file)
#inetd -c
after this every ftp file will have the permission 0755
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 11:51 AM
тАО07-22-2003 11:51 AM
Re: how to set permissions on ftp files ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 12:35 PM
тАО07-22-2003 12:35 PM
Re: how to set permissions on ftp files ?
The above is my sample ftpaccess file. am I missiong something to configure ftpaccess. Is this a potential security hole ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2003 03:59 AM
тАО07-24-2003 03:59 AM
Re: how to set permissions on ftp files ?
If u don't want to complicate things there
is the chmod cmd on your ftp session ftp support this command .
Eitan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2003 07:47 AM
тАО07-24-2003 07:47 AM
Re: how to set permissions on ftp files ?
secondly, umask setting for ftpd will affect files you "put" through ftp only, while files "get" from ftp will be affected by your environment umask, not ftp umask.
thanks,
Gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2003 10:43 AM
тАО07-24-2003 10:43 AM
Re: how to set permissions on ftp files ?
Please check the following link:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x09cad7d96cbad711900a0090279cd0f9,00.html
You will find other options here. Whew! That was a fun exercise.
Best of luck,
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2003 01:09 PM
тАО07-25-2003 01:09 PM
Re: how to set permissions on ftp files ?
This is the only section of the ftpaccess file that needs modification.
# specify the upload directory information
upload /var/ftp * no
upload /var/ftp /incoming yes root daemon 0600 dirs
upload /var/ftp /bin no
upload /var/ftp /etc no
sample additional entry -
upload /home/dlamar * yes dlamar adm 0640 dirs
The above entry says "for ftp user dlamar, all files put to any (*) directory on this machine will have permissions of rw-r-----".
You can be more specific by declaring a particular directory instead of * (all)
And yes, after making the change perform
inetd -c to reread the file.
Best of luck.
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2003 01:37 PM
тАО07-25-2003 01:37 PM
Solutioni.e.
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a -u XXX
Any changes here alos require an inetd -c
dl