mutt in filepro and file permission
John Esak
john at valar.com
Thu Dec 31 15:17:02 PST 2009
Hey Scott,
One trick is the following. You seem to know when this file is being created
by some other filePro app. When the file is created, change its permissions
then and there. That way the "owning" process also releases its ownership or
sets permissions appropriately for subsequent processes with different
access. So, I usually put the releasing code or modifying code right in the
same SYSTEM command that creates the file in the first place. Something
like:
then: system ">/tmp/myfile; chmod 755 /tmp/myfile"
You could do a chown as well here, but why bother? If all the users can read
the file that is usually enough, but you can alter it any way you want
because you just created it."
Now, when your next program comes along it will have no problem accessing
the file. You nip the problem off in the "bud" stage so to speak.
If you are using file I/O to make the file or any other function... Just be
sure to get the permissions right with a separate SYSTEM call while you are
in that process.
The smart thing to do would be to create() or open() the file... Fill it
with whatever goes in it.... Close() it... Then run a system command to set
its permissions to allow the access you want.
Doing it at creation time saves a lot of hassle later.
John
Side note about xfer:
Too bad this can't be done when "xfer'ing" a file. If you happen to be
logged in to a Unix system as filePro, and you use the -lf function to dump
the output into a file... It gets created all owned and restricted to the
filePro user. Usually, when you try and get that file off the Unix system
from the Windows system, a complaint is thrown up about not being able to do
it. So, always change the files created with xfer to have more open
permissions, before you try and grab them from a Unix share onto your
Windows box.
> -----Original Message-----
> From: filepro-list-bounces+john=valar.com at lists.celestial.com
> [mailto:filepro-list-bounces+john=valar.com at lists.celestial.co
m] On Behalf Of Scott Nelson
> Sent: Thursday, December 31, 2009 1:47 PM
> To: filePro Mailing List
> Subject: mutt in filepro and file permission
>
> filePro 5.0.13 on SCO 6
>
> I am trying to use mutt on a system line in filePro to send an email
> with a PDF attachment. The PDF file is on a shared drive and
> is created
> by a windows program and it get;s the permission of the
> username that is
> logged into windows. Even though the shared folder is owned
> by filePro,
> using a chmod on the system line will not change the permissions, and
> mutt will not pickup the file to attach.
>
> I need to change the permission on the PDF file, or perhaps
> do a script
> that filePro will call that will run mutt, keeping the same
> user name as
> who is logged in and using filePro to be the from name. The
> PDF file is
> Not created by the user, but by a different filename and a
> program that
> runs on windows as that other user.
>
> I hope that my ramblings are clear, and I accept all ideas graciously.
>
> Happy New Year to All.
>
> Scott
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
More information about the Filepro-list
mailing list