Ok, we start CF manually with the command: 
    ./jrun -nohup -start -childVM foo

ps -ef  reports (under foo login):
    foo   ...   ./jrun -nohup -start -childVM foo  
    (here, foo is the name of the service)

Notice that there is a user account named "foo".  Logging in as "foo", the 
groups command reports that user "foo" is in three groups: foo, alpha and beta. 
 Notice that there is a group named "foo".  The group "beta" has "rwx" access 
on the offending folder and the user "foo" is in the group "beta".

    drwxrwxr-x    beta  beta  Jun 23 14:22 offending_folder

To further confuse things, there's a user account called "beta".  Don't ask me 
why this was set up like this.  I had the application echo the target folder 
where it would write the uploaded file and it is exactly where it should be 
pointing: the offending folder.  This is a local mount.  We can access the file 
system from our Windows workstations via Samba/Windows Shares.  The exact same 
code works fine on our test server.  But, permissions/users/groups are somewhat 
different.  Just as a test, I changed the permissions on the offending folder 
from rwxrwxr-x to rwxrwxrwx and the app works just fine.  We see the uploaded 
file in the directory listing.  Therefore, whatever account CF is running 
under, it is not seen as owner or part of the accessible group with write 
permissions.

>Wait a minute now, Robert Nurse is the OP.  I think Rick was just
>chiming in with his config... 
>
>Robert said CF has been starting with a user called "foo" however he
>also said they have been starting CF manually as well.  Robert, we need
>you to be more specific.  Does the file write work when you start it
>manually?  When you start CF manually, _how_ are you starting it?  Like,
>what specifically do you run from the command line to start it.  If you
>you are running a bash script that has the "foo" user inside it then it
>is running under "foo".  If you are directly  invoking Jrun, then it is
>using your current user.
>
>Can you please grep the process list and find out.  We can only make
>wild assumptions until then.
>
>And lest we get carried away on grepping and psing, can you back up a
>little and confirm that the directory you are trying to write in is
>actually the location you think you are using?  If you are using expand
>path or a relative path, you may be actually pointing somewhere else and
>not be realizing it.  Also, is this on a local mount?  Writes to Samba
>shares to a file server introduce a new level of permission problems.
>
>Tell us, has this code ever worked, or did it just now stop working?  I
>would step through the code and figure out if you are really writing
>where you think you are, and chmod the folder to 777 just to see and
>take small steps.  You've got to systematically eliminate your problems.
> I still think there's a chance you might be pointed at the wrong
>directory if there is no exception being thrown.
>
>~Brad
>
> Yup, that's your issue. Either chmod -R 777 on the dir where you want
> to save files (maybe not so good) or change that line to
> RUNTIME_USER="foo" and you should be on your way!
> If you do change the RUNTIME_USER ensure your other dirs have correct
> permissions too or you will have bigger problems!
> 
> 
> >
> > I am running Coldfusion 7 Standard under CentOS Linux
> >
> > This line is in /etc/init.d/coldfusionmx7
> >
> > RUNTIME_USER=""nobody""
> >
> > Rick
> >
> > 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325974
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to