[100261] in RedHat Linux List
RE: how do file permissions work? I can't copy in my Java EXEC()
daemon@ATHENA.MIT.EDU (FRANCISCO IACOBELLI)
Thu Nov 19 12:51:43 1998
From: FRANCISCO IACOBELLI <FIACOBELLI@ibersis.cl>
To: "'redhat-list@redhat.com'" <redhat-list@redhat.com>
Date: Thu, 19 Nov 1998 14:41:53 -0400
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Permisions are very simple, i bet you know that..unless there is an "s" in
between "rwx". anyway, try "chmod 755" before you EXEC "cp" and then
reestablish the old permissions.
fid.
> -----Mensaje original-----
> De: Justin Kuntz [SMTP:jkuntz@prominic.com]
> Enviado el: Jueves 19 de Noviembre de 1998 12:48 PM
> Para: redhat-list@redhat.com
> Asunto: how do file permissions work? I can't copy in my Java EXEC()
> call
>
>
> 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.
--
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.