Defumask and upload directive in ftp


 
Thread Tools Search this Thread
Operating Systems Solaris Defumask and upload directive in ftp
# 1  
Old 03-10-2014
Defumask and upload directive in ftp

Hi,

I'm aware that this question has been raised earlier and the solution provided has not helped me. So, the issue is that I'm trying to set a defumask to files transferred via ftp to be 002 so that the group may have write permissions to the files uploaded. We have local/system users uploading files.

No matter what combination of defumask and upload directive I try the permission of the uploaded file is 644. The users umask is 002. My ftpaccess file is as follows

Code:
# ident "@(#)ftpaccess  1.2     03/05/14 SMI"
#
# FTP server configuration file, see ftpaccess(4).
#

class           realusers       real            *
class           guestusers      guest           *
class           anonusers       anonymous       *

loginfails      3
passwd-check    trivial         warn
private         no
shutdown        /etc/ftpd/shutdown.msg
# email         user@hostname
# guestuser     username
# rhostlookup   no

keepalive       yes
recvbuf         65536           real,guest,anonymous
sendbuf         65536           real,guest,anonymous
# flush-wait    no              anonymous
# passive       ports           0.0.0.0/0       32768   65535
# timeout       data            600
# timeout       idle            300

banner          /etc/ftpd/banner.msg
greeting        brief
message         /etc/ftpd/welcome.msg   login
message         .message                cwd=*
readme          README*                 login
readme          README*                 cwd=*
# quota-info    *

chmod           no              anonymous
delete          no              anonymous
overwrite       no              anonymous
rename          no              anonymous
umask           no              anonymous

compress        yes             realusers guestusers anonusers
tar             yes             realusers guestusers anonusers

path-filter     guest,anonymous /etc/ftpd/filename.msg  ^[[:alnum:]._-]*$ ^[.-]

noretrieve      relative        class=anonusers         /
allow-retrieve  relative        class=anonusers         /pub

upload          class=anonusers    *    *         no  nodirs
# upload        class=anonusers    *    /incoming yes ftpadm ftpadm 0440 nodirs

# log           commands        real,guest,anonymous
# log           security        real,guest,anonymous
# log           transfers       real,guest,anonymous    inbound,outbound
# xferlog       format  %T %Xt %R %Xn %XP %Xy %Xf %Xd %Xm %U ftp %Xa %u %Xc %Xs %Xr

# limit-time    anonymous       30
# limit         anonusers       10      Wk0730-1800       /etc/ftpd/toomany.msg
# limit         anonusers       50      SaSu|Any1800-0730 /etc/ftpd/toomany.msg

I have undone the changes I made to the file. It is vanila. Any suggestions
# 2  
Old 03-10-2014
Post the output of:
Code:
cat /etc/release
inetadm -l ftp

# 3  
Old 03-10-2014
I'm sorry I forgot to mention the details in my earlier post

Code:
[root@########]$cat /etc/release
                   Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC
  Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
                            Assembled 23 August 2011

and

Code:
SCOPE    NAME=VALUE
         name="ftp"
         endpoint_type="stream"
         proto="tcp6"
         isrpc=FALSE
         wait=FALSE
         exec="/usr/sbin/in.ftpd -a"
         user="root"
default  bind_addr=""
default  bind_fail_max=-1
default  bind_fail_interval=-1
default  max_con_rate=-1
default  max_copies=-1
default  con_rate_offline=-1
default  failrate_cnt=40
default  failrate_interval=60
default  inherit_env=TRUE
default  tcp_trace=FALSE
default  tcp_wrappers=FALSE
default  connection_backlog=10

# 4  
Old 03-10-2014
Well I have update 4 while you have update 10. Your ftpd does have -a set just like mine. I used ftp to put a test file in /tmp... in had no group write bit set. I deleted it.
I added "defumask 007" to ftpaccess and retried the test. This time I had group write set. If this doesn't work for you I don't know why.
# 5  
Old 03-10-2014
Ok, now there is a interesting development. When I upload files to /tmp ,the permissions are 664 as I wanted. However, when the user is uploading the files to his home directory they get the permissions as 644.

Ex : User1 is ftp'ing to the server, logged in successfully. He is uploading a file ( which is 777 ) to his current location ( home dir ) and the permission comes up to be 644. I have checked the umask on the user it is 002 and when he created files locally in his home directory they end up 664.
# 6  
Old 03-10-2014
Stuff uploaded to my home directory is also following the defumask setting just as well as /tmp does.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Upload latest file to ftp

Hi, I want to create a script that parses the content of a file (on each line there is a filename with full path containing the latest fiels created on that day) and uploads every file to a ftp location. Any elegant way to do it ? (4 Replies)
Discussion started by: liviusbr
4 Replies

2. Shell Programming and Scripting

Find files and upload to FTP Server

HI, I need a script to find new files that created after 6:00 from /home/ugh /demo/conn /UAT/d01 and upload them into ftp server according to system date: Please help me (1 Reply)
Discussion started by: refra
1 Replies

3. Shell Programming and Scripting

FTP Upload

Can any one help in writing FTP upload script using bash .. with specific port -oPort=62022 #/bin/bash FTPU="username" # ftp login name FTPP="password" # ftp password FTPS="localhost.com" # remote ftp server FTPF="/test" # remote ftp server directory for $FTPU & $FTPP port="2345"... (3 Replies)
Discussion started by: ram5019
3 Replies

4. Shell Programming and Scripting

FTP upload

Hi All, I am new to this forum and i need help from you . Here i want to get a mail conformation when ever the file was uploaded to FTP server.Here is my FTP script . Can any one plz help me how to get a mail confirmation weather the file was uploaded or not. #!bin/sh HOST='192.168.2.85'... (4 Replies)
Discussion started by: qfund
4 Replies

5. Shell Programming and Scripting

bash script for ftp-upload is not working

Hello everyone, sorry for the title, most of you must getting sick of reading something like this, but I haven't found a solution, although I found many threads according to it. I'm working on a bash script that connects to a network printer with ftp where I want to upload a pdf created... (3 Replies)
Discussion started by: le_mae
3 Replies

6. Shell Programming and Scripting

Upload files from desktop to unix through FTP

Hi , I want to upload some files from my desktop to unix server through FTP . The list of files are in a text file .Please suggest how to do it through scrip . Thanks in advance .. Anupam (8 Replies)
Discussion started by: anupamhalder
8 Replies

7. Shell Programming and Scripting

Ftp from server1 and upload to server3 from server2

Hi , i have three server server1 -> Unix OS ,ftp enable IP ->10.8.219.190 server 2 -> Unix OS ,ftp enable NIC 1 IP ->10.8.219.191 ,NIC2 ->192.168.0.5 server3 -> windows OS ,ftp enable NIC1 ->192.168.0.6. hence server 1 and server 3 can not communicate ,but server 2 can... (1 Reply)
Discussion started by: suchintkotia
1 Replies

8. HP-UX

not able to upload the pjl commands thru ftp

Hi , By status requests to the printer using the PJL commands like status_read_back there is no answer. The printer itself is functioning well and is printing all requests. Ping, lpstat -t, nslookup is functioning well. The printer model is HP LJ 4200. The printer has been configured as network... (1 Reply)
Discussion started by: amit kul
1 Replies

9. Linux

upload FTP

I have a ftp server up , however when I upload a file from my desktop to the server I get this message: ftp> get uploadtest.txt Local: uploadtest.txt Remote: uploadtest.txt 227 passive Mode ( 192,168,0,1,190,75) 550 Failed to open file ftp> (3 Replies)
Discussion started by: keliy1
3 Replies

10. UNIX for Advanced & Expert Users

Ftp Upload Folder

Hi! I'd like to upload a complete folder with subfolders with put. At the moment I always get the err-msg: aboutme: not a plain file Could anyone help me?? Thanx (3 Replies)
Discussion started by: roberthawke
3 Replies
Login or Register to Ask a Question