Assigning file priviledges from code.

B

Bob Quintal

Hi,

I wrote an Access '97 application in 2001 that creates a tab
delimited file on a network drive that is shared by the Windows users
and an Unix application, using SMB..

It worked fine, all users wre able to regenerate the file, and all
users of the Unix application could read the file from the Unix side.

Some changes were made to the system last week that have resulted in
the file having rights only to the Windows userID who runs the
session that creates the file.

Other users cannot read or delete the file unless the 'owner' right-
clicks the file name, selects properties, and assigns the rights to
members of 'everyone' (the only group available).

Unless the owner assigns the rights, a different user who tries to
overwrite the file gets an error message that the file cannot be
written.

Worse yet, the Unix system refuses to read the file except when the
Unix login ID matches the Windows login ID of the file's 'owner'

Does anyone have a code example of how to set file access rights via
VB code from an Access 97 mdb.

Off the top of my head:
Grant group:"Everyone" file:"X:/path/file.tab" rights:"RWED"
or something similar
 
A

Albert D. Kallal

I not sure if this can or should be attempted to be fixed from ms-access.

Then next week a person will copy a power point presentation to a shared
folder, and you be asking how to set permissions from power point.

Then, next week someone will copy and save a Excel sheet, and then you be
asking in an Excel group how to set permissions.

And next week (etc etc etc etc...you get the idea).

Seems to me this is system issue. Likely the folder or shared directory is
setup to inherit permissions from the user that created the file. The target
folder should be setup for full rights and permissions by everyone, and not
some "inherited" permissions from the person that creates this file.

I really think you going down the wrong path to start having each and every
application attempt to set file permissions. If you think about the above,
then every application that creates a file must then start to manage
permissions. You going to darn well wind up re-writing the whole permission
system that the operating system is supposed take care in the first place.
 
B

Bob Quintal

I not sure if this can or should be attempted to be fixed from
ms-access.

Then next week a person will copy a power point presentation to a
shared folder, and you be asking how to set permissions from power
point.

Then, next week someone will copy and save a Excel sheet, and then
you be asking in an Excel group how to set permissions.

And next week (etc etc etc etc...you get the idea).

Yeah. I get the idea.
Seems to me this is system issue. Likely the folder or shared
directory is setup to inherit permissions from the user that
created the file. The target folder should be setup for full
rights and permissions by everyone, and not some "inherited"
permissions from the person that creates this file.

Yes it IS a system issue. Unfortunately, I don't have the authority
to reverse some misguided political decisions.
I really think you going down the wrong path to start having each
and every application attempt to set file permissions. If you
think about the above, then every application that creates a file
must then start to manage permissions. You going to darn well wind
up re-writing the whole permission system that the operating
system is supposed take care in the first place.
Thanks for your views. The sad part is that in principle I agree with
you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top