Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Script not setting ownship of new directory

by sgifford (Prior)
on Jul 29, 2008 at 05:16 UTC ( #700731=note: print w/ replies, xml ) Need Help??


in reply to Script not setting ownership of new directory

In addition to using numeric IDs (as pc88mxer suggests), you will need to make sure the user your Web app is running as is in the sftp group. The list of groups is stored in the $( variable, and this will print all of the groups you are in so you can check:

print join( " ",$( );

Also, using -1 for the first argument, to avoid changing the owner and only change the group, may be simpler.


Comment on Re: Script not setting ownship of new directory
Select or Download Code
Re^2: Script not setting ownship of new directory
by bradcathey (Prior) on Jul 29, 2008 at 12:56 UTC

    Thanks sgifford, pc88mxer, et al! I changed the user id to -1 and went with numeric equivalent for the group and it worked as advertised. And hopefully without anything that would jeopardize the system as graff warned against.

    chown -1, 1003, 'foobar' or die;

    Again, the Monastery comes through.

    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://700731]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2014-07-30 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls