If this program is the only one using that share (or you can create a  
special share precisely for this purpose, even if just duplicating an  
already existent share with a new name), you can force the user on  
the unix side via the share definition.

For example, for one of my web shares, I have the following setup:

in smbusers:

usera = windowsuser_1
userb = windowsuser_2
...

smbpasswd has passwords for each of these users.

Then, in smb.conf:

[web]
         comment = The root of all evil
         path = /path/to/www
         writeable = yes
         create mask = 0664
         directory mask = 0775
         force user = www
         valid users = usera userb
         veto files = /._*/

The key here is the 'force user' command (there is also a force  
group, I believe, if that becomes a problem).  This makes all actions  
that happen on the unix side happen as user 'www'.  The result is  
that any of valid users can connect, but they never mess up the  
permissions because everything happens as a user who is valid to do  
stuff in the directory.

Does this make sense?

HTH,
Ricky


On May 10, 2006, at 11:40 AM, Greg London wrote:

> Garh!
>
> So I have a perl script that runs on Windows.
> It runs on windows because it needs to stuff
> some user numbers into a spreadsheet
> via Win32::OLE, let the spreadsheet calculate
> new values, and then generate some text files.
>
> Users run the script from Windows
> and the script ends up creating a directory
> and a handful of files in it.
>
> Users then go over to the linux side of things,
> go into this newly created directory and
> run a bunch of commands there manually.
>
> The problem I'm seeing is that the files
> created from windows are all owned by "65530".
> When the users go to the unix side and try
> to run stuff, it looks like they're gettting permission
> problems, and now I'm wondering if the problem
> is the fact that the directory and files are all
> created from windows, through Samba,
> to what is actually a unix drive.
>
> Is there a way to pass owner information along
> somehow when I'm creating these files so
> I can say they belong to 'london' rather than
> 65530? Or maybe there's a way to change
> the owner once the directory and files are
> created? I'd like to fix this from the windows
> side if possible because that's where my
> script exists, then it would be transparent
> to the users that extra stuff is being done.
>
> And I need this working before 5 pm or I'm sunk.
>
> Greg
>
>
>
> _______________________________________________
> Boston-pm mailing list
> [email protected]
> http://mail.pm.org/mailman/listinfo/boston-pm

 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to