The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX
.
google unix.com



HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help in changing Permissions to 775 for files and directories ranga27 Shell Programming and Scripting 1 01-16-2008 09:40 AM
How to change default permissions on new files rdgblues UNIX for Dummies Questions & Answers 1 08-30-2006 05:56 AM
insufficient metadevice database replicas ERROR mr_manny SUN Solaris 2 11-11-2005 02:55 PM
FTP'ed in ASCII a word file, how to recover venkir UNIX for Advanced & Expert Users 1 07-28-2005 03:12 AM
Permissions on link files moviestud80 UNIX for Dummies Questions & Answers 2 04-01-2005 04:01 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-15-2004
Anamika Anamika is offline
Registered User
  
 

Join Date: May 2004
Posts: 11
Cool 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 (permalink)  
Old 05-15-2004
google's Avatar
google google is offline Forum Advisor  
Moderator
  
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
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 10:53 PM..
  #3 (permalink)  
Old 05-15-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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 (permalink)  
Old 05-16-2004
Anamika Anamika is offline
Registered User
  
 

Join Date: May 2004
Posts: 11
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 (permalink)  
Old 05-16-2004
Anamika Anamika is offline
Registered User
  
 

Join Date: May 2004
Posts: 11
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 (permalink)  
Old 05-16-2004
Anamika Anamika is offline
Registered User
  
 

Join Date: May 2004
Posts: 11
Cool

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
  #7 (permalink)  
Old 05-16-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0