Operating System - HP-UX
1849849 Members
3784 Online
104044 Solutions
New Discussion

Group Rights to a Directory

 
Scott Callicott
Occasional Advisor

Group Rights to a Directory

I want to give everyone in a Group RWX rights to anyfile that is placed in a directory. Who would I go about doing this?
6 REPLIES 6
Krishna Prasad
Trusted Contributor

Re: Group Rights to a Directory

chgrp groupname dir_name
chmod 77? dir_name

This gives rwx to the owner rwx to the group. You need to decide what you want everyone else to have.
Positive Results requires Positive Thinking
Scott Callicott
Occasional Advisor

Re: Group Rights to a Directory

Here is what I have. I have users FTPing files into a Directory and currently when the file comes in it is
-rw-r-----

I need the files to come in as
-rwxrwxrwx

So the system can intergret the files with any login.
Patrick Wallek
Honored Contributor

Re: Group Rights to a Directory

You will have to manually chmod the files so that they have 777 permissions. Even with a umask of 0, files will only have permissions of 666.

Do the files HAVE to have execute permission? Are they script files that will be executed or are they just data files that all users need to be able to write to?

If they are data files then you can do a 'umask 0' within ftp and the files will be created with 666 (-rw-rw-rw-) permissions.
Darrell Allen
Honored Contributor

Re: Group Rights to a Directory

Hi Scott,

If you are on 11.x you can utilize ftpaccess. I haven't used it but there's a number of threads in the forums concerning it.

Search the forums for ftpaccess. I found several interesting threads specifying "+ftpaccess +chmod" as my search entry.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Scott Callicott
Occasional Advisor

Re: Group Rights to a Directory

Yes I am using 11.0
And can not use 666 I need rwxrwxrwx so I have to have the files come in as 777 because the program that converts the files will not allow you to do the process unless it has x. I have tried setting up the ftpaccess in 11.0 but must have a setting wrong because they are not coking in as 777.
Patrick Wallek
Honored Contributor

Re: Group Rights to a Directory

Sounds like your conversion program needs some work. Why does it require 'x' access on the files?

Anyways, have a look at 'man ftpaccess' and look at the upload section. I think what you want is something like:

upload /users/home /incoming/dir yes owner group 0777