[100252] in RedHat Linux List

home help back first fref pref prev next nref lref last post

how do file permissions work? I can't copy in my Java EXEC() call

daemon@ATHENA.MIT.EDU (Justin Kuntz)
Thu Nov 19 12:29:06 1998

From: "Justin Kuntz" <jkuntz@prominic.com>
To: redhat-list@redhat.com
Date: Thu, 19 Nov 1998 10:48:04 -0600
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com


OK,

*NOW* I am officially confused.  For the past 8 hours I have been pulling
my hair out wondering why my Java program's call to Exec() fails on a
simple cp command.  The JVM is executing as root.  Does it not, then, spawn
processes as root also?

I think I don't understand how 'cp' works with the UNIX filesystem.  I am
trying to automate the configuration of our user account management through
a distributed Java framework.  I realize many of you would think I am crazy
for not knowning enough about Perl to do this... but I have my reasons for
doing it this way.

I have tried every variation of command-line arguments that I can think of
to go along with 'cp'.  All of these commands do EXACTLY what I would
expect at a prompt when I type them in directly -- meaning, the files get
copied and everything.  All of my other commands seem to work fine from the
Exec() call I am making.

11/19/98 05:32:03 AM       EXEC rc=256 cmd=cp -fadp /home/ftp/bin/*
/home/KKonnector/bin

The /home/ftp/bin, etc, and lib dirctories have very restrictive access
permissions.  As you probably can guess, this is (from what I understand)
the configuration to get someone 'restricted' FTP access so they cannot
traverse the rest of the filesystem.  I am sure my command is failing
because of something I do not understand about the access permissions, and
I am hoping one of you can help me solve this... quickly!  I am already
very late getting this system operational.

Incidentally, I will be making the Java source code available if anyone is
interested.

Thank you,

Justin Kuntz


11/19/98 05:31:54 AM     VHostUserAgent starting
11/19/98 05:31:57 AM     Read /etc/passwd
11/19/98 05:31:57 AM     ** START Processing User: KKonnector
11/19/98 05:31:57 AM       makeNoShellUserAccount()
11/19/98 05:31:57 AM       addUserAccount()
11/19/98 05:31:58 AM       EXEC rc=256 cmd=mkdir /home/KKonnector
11/19/98 05:31:58 AM       EXEC rc=256 cmd=mkdir /home/KKonnector/html
11/19/98 05:31:58 AM       EXEC rc=256 cmd=mkdir /home/KKonnector/html-logs
11/19/98 05:31:59 AM       EXEC rc=256 cmd=mkdir /home/KKonnector/bin
11/19/98 05:31:59 AM       EXEC rc=256 cmd=mkdir /home/KKonnector/etc
11/19/98 05:31:59 AM       EXEC rc=256 cmd=mkdir /home/KKonnector/lib
11/19/98 05:32:00 AM       EXEC rc=0 cmd=chown KKonnector
/home/KKonnector/html
11/19/98 05:32:01 AM       EXEC rc=0 cmd=chown KKonnector
/home/KKonnector/html-logs
11/19/98 05:32:01 AM       EXEC rc=0 cmd=chown root.root
/home/KKonnector/bin
11/19/98 05:32:01 AM       EXEC rc=0 cmd=chown root.root
/home/KKonnector/etc
11/19/98 05:32:02 AM       EXEC rc=0 cmd=chown root.root
/home/KKonnector/lib
11/19/98 05:32:02 AM       EXEC rc=0 cmd=chmod 111 /home/KKonnector/bin
11/19/98 05:32:02 AM       EXEC rc=0 cmd=chmod 111 /home/KKonnector/etc
11/19/98 05:32:03 AM       EXEC rc=0 cmd=chmod 111 /home/KKonnector/lib
11/19/98 05:32:03 AM       EXEC rc=256 cmd=cp -fadp /home/ftp/bin/*
/home/KKonnector/bin
11/19/98 05:32:04 AM       EXEC rc=256 cmd=cp -fadp /home/ftp/etc/*
/home/KKonnector/etc
11/19/98 05:32:04 AM       EXEC rc=256 cmd=cp -fadp /home/ftp/lib/*
/home/KKonnector/lib
11/19/98 05:32:05 AM       EXEC rc=0 cmd=touch /home/KKonnector/.rhosts
11/19/98 05:32:06 AM       EXEC rc=0 cmd=touch /home/KKonnector/.forward
11/19/98 05:32:06 AM       EXEC rc=0 cmd=chown root.root
/home/KKonnector/.rhosts
11/19/98 05:32:07 AM       EXEC rc=0 cmd=chown root.root
/home/KKonnector/.forward
11/19/98 05:32:07 AM       EXEC rc=0 cmd=chmod 400 /home/KKonnector/.rhosts
11/19/98 05:32:08 AM       EXEC rc=0 cmd=chmod 400
/home/KKonnector/.forward
11/19/98 05:32:08 AM     ** END Processing User: KKonnector
11/19/98 05:32:08 AM     **** PROCESSING COMPLETE ****



-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post