Insufficient permissions on ftp'ed files from WIN2K to HP-UX


 
Thread Tools Search this Thread
Operating Systems HP-UX Insufficient permissions on ftp'ed files from WIN2K to HP-UX
# 1  
Old 05-15-2004
Tools Insufficient permissions on ftp'ed files from WIN2K to HP-UX

We have an application running on Win2K and this application ftp files to HP-UX using ftpdc as user id. The files are created in HP-UX with following permissions:

-rw-r----- 1 ftpdc users 968321 Apr 12 22:57 aaaa.txt

There is a job that runs on HP-UX trying to modify this file using the userid "marvin". Marvin and ftpdc belong to different groups. Marvin's job fails since marvin doesn't have permissions to modify the ftp'ed file.

I checked the umask in marvin's .profile. There is no umask defined in .profile.

Case 1: I added umask 000 in the .profile and still didn't work. man pages said that umask 000 is default.

Case 2: I changed the umask 002. Still it didn't work. The files are still coming with insufficient permissions.

Is there anyway I can get files created with rw-rw----Please I need some help.....
# 2  
Old 05-15-2004
Why would changing marvins umask help when this user does not own the file, nor create the file? Why not change the umask of the user ftpdc that created the files to allow people assigned to the same group to read, write the file? Seems as though this would be the easiest approach.

Last edited by google; 05-15-2004 at 11:53 PM..
# 3  
Old 05-16-2004
Things aren't quite that simple. When you say "change someone's umask", what exactly do you mean? You probably mean changing a umask command in a start-up file like .profile. That is fine if you are running a shell that reads the script.

But an ftp session doesn't involve a shell. Changing .profile doesn't change anything there.

What to do depends on which ftp server you are running. The standard ftp server delivered with HP-UX has a umask option. See the man page. You can add that option to the ftpd line in /etc/inetd.conf. But it is a global change and will affect every ftp user on the box.

A second option would involve modifying the application. A user who connects via ftp gets the default umask. But the user can issue a umask command to change the umask. Also a user can issue a chmod command to change the permissions on a file. Scan down on that same man page to info about the umask and chmod commands. If you can get the application to do one or the other, that would solve the problem.
# 4  
Old 05-16-2004
Hello Google,

I made an error while describing the problem. I actually changed the .profile of ftpdc and not Marvin in both the cases.

For security reasons ftpdc and the marvin cannot be belong to the same group.

Thanks
# 5  
Old 05-16-2004
Hello Perderabo,
We tried option two. The user on Win2K is using an application developed by a vendor to ftp files at the end of a business process. The vendor's application performs the ftp and it does n't have any option to set the mask or permissions on the outgoing file.

I will try the option 1 and will let you know.

Thanks
# 6  
Old 05-16-2004
Tools

I checked /etc/inetd.conf file on my Unix server. I see following entries for ftp:

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l
tftp dgram udp wait root /usr/lbin/tftpd tftpd\
/opt/hpxt\
/home/tftpdir\
/tmp\
/opt/ignite\
/var/opt/ignite

There is no seperate line for ftpd service name. are these entries okay.
I am not sure what needs to be done in this inetd.conf file to fix my permissions problem.

Thanks
Smilie
# 7  
Old 05-16-2004
The first line that you posted is the line that needs a change. The first field is "ftp" and that tells you that the line controls the ftp service.

The second entry has "tftp" so it controls trivial ftp, a similiar but different service. This entry is multiline as you seem to recognize. You will leave this entry alone.

The default umask is 027. You need to decide what you want it to be. I will assume the you want 007. I always express umask as a 3 digit number.

So you want to edit the line so it reads:
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -u 007

Now you need to cause inetd to reread that configuration file. The official way to do that is to run:
inetd -c
Another way is send a HUP to inetd manually. This is all "inetd -c" does, it finds the real inetd process and send a HUP to it.

Whichever you do, wait about 15 seconds to be sure that the process is finished. Now new ftp connections should get the new umask.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How do files transferred via ftp or sftp gets thier permissions at destination?

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)
Discussion started by: kchinnam
4 Replies

2. UNIX for Dummies Questions & Answers

FTP loses write permissions

Hi Guys, i have learned today that when you ftp a file with full write permissions (777) to another destination it loses the w options. so a file that was once -rwxrwxrwx(before FTP) is now -rw-r--r-- (after FTP). why does this happen? and is it configurable? Regards, (8 Replies)
Discussion started by: brian112
8 Replies

3. UNIX for Dummies Questions & Answers

Permissions Issues FTP server

Hi all, Quick question, im going to find this a bit hard to explain but ill give it a go. Basically i have an admin account on an FTP server that i want to be able to control ALL files without having to use sudo (as i need to run cron scripts to move files that are owned by a number of... (2 Replies)
Discussion started by: mokachoka
2 Replies

4. UNIX for Dummies Questions & Answers

permissions on ftp...

hi, how can I see permissions through ftp connection ? I can't see them using "ls -l" as in the local system.. thanks (1 Reply)
Discussion started by: aneuryzma
1 Replies

5. AIX

FTP file permissions

Hi all, I am using ftp command to transfer a file from one AIX5.3 box to different box with the same OS level. Is there a way I could change the permissions on the file once its transferred, as I am automating the process but the file permissions on the target does not allow other users to access... (2 Replies)
Discussion started by: sam_78_nyc
2 Replies

6. UNIX for Dummies Questions & Answers

FTP Permissions

Hi Guys, I am trying to grant FTP acccess to my server for a WebDesigner to be able to upload live and see how it looks online. I created a new user (WebDes:tomcatUsers) and created his home dir as /var/lib/tomcat5/webapps/uPhoto/ and then made sure he CHROOT's to his home dir so he only... (1 Reply)
Discussion started by: boarderstu
1 Replies

7. UNIX for Dummies Questions & Answers

OpenBSD Ftp permissions problems - help!!

Hello, Ok I have a couple of little problems that I can't for the life of me work out how to solve. I wasn't involved in setting the server up, I've just "inherited" the support for it. I've done my best to be a good little newbie, researched articles, tried things out and managed to only get... (1 Reply)
Discussion started by: Andy68man
1 Replies

8. HP-UX

FTP user files permissions problems!!!

Hi, I have a problem with my ftp accounts whereby if any external ftp party connects to our server and puts any file in a directory on our server. The file permissons are always -rw-r----- and no read for others. I have adjusted the ftp user .profile to include 'umask 022' but this only works... (3 Replies)
Discussion started by: budrito
3 Replies

9. UNIX for Dummies Questions & Answers

ftp file with full permissions

I am running sco openserver 5.0.6 and I was wondering if I could ftp files to one of my other servers and that file have full permissions set automatically on the new server. I have searched the internet and manned chmod chown and ftp but they only seem to talk about giving the permissions after... (7 Replies)
Discussion started by: stufine
7 Replies

10. UNIX for Dummies Questions & Answers

ftp permissions error

HI, I am not really even a newbie I'm just posing as one until our sys admin gets back from vacation. I am getting errors downloading certain files from an NT Server onto our inhouse Unix fileserver. Certain files always return errors when downloading to their proper directory.... (2 Replies)
Discussion started by: newbie10
2 Replies
Login or Register to Ask a Question