?
Solved

How can limited users in XP share (and edit) files from each other with a NTFS

Posted on 2004-04-05
6
Medium Priority
?
497 Views
Last Modified: 2007-12-19
Hello,
I've read a lot of documentation about ownership / permissions etc. But still have one big problem:

On Win XP pro with NTFS:

User 1 (limited account) is creating a xml-file with VB6

User 2 (also limited account) gets a "permission denied" when retrieving this file

I tried several locations for the file, f.e. "shared documents etc." but still get the same problem.

As an administrator I do not have this problem, because I can change the onwnership of the file to "Everyone". But limited account do not have rights to change ownership.

Any solution is very welcome!

With greetings,

A. Calje
0
Comment
Question by:410328
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Assisted Solution

by:_Gerry_
_Gerry_ earned 200 total points
ID: 10755991
Doesn't it work if you have both users access a folder you created as an administrator and shared with security set specifically to allow users 1 and 2 read/write access (or with more finesse, allows user 2 read-only access to the folder). Any file user1 writes into that folder *should* be readable by user 2.
0
 
LVL 26

Assisted Solution

by:EDDYKT
EDDYKT earned 200 total points
ID: 10756659
>>User 2 (also limited account) gets a "permission denied" when retrieving this file


if the administrator allows everyone to read or at least user 2 to read, I don't see why this happens
0
 

Author Comment

by:410328
ID: 10757592
Thanks for your reply.

To be more specific:

I created a folder as Gerry suggested ( f:\Ourfolder )

When I set the permission to this folder like:

cacls f:\Ourfolder /g everyone:f
(for the folder)
and
cacls f:\Ourfolder\*.* /g everyone:f
(for the files in it)

that works fine. Users can share edit each other txt-files

But when I try to open a xml-document with xml.load mydoc.xml (where mydoc.xml is created by another limited user) I get "Access denied" Error -214702489 to be exact (and not Permission denied)

I can solve this problem by setting the permissions again with cacls and setting the permission to full for *.* in f:\ourfolder.  But you can only use cacls as an administrator

So files created after using cacls are still owned by their creator...

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 76

Accepted Solution

by:
David Lee earned 1600 total points
ID: 10759254
"So files created after using cacls are still owned by their creator"

I doubt if that's the issue.  If I remember my NT security correctly, file ownership doesn't have anything to do with users being able to open, read, write, etc. to/from a file.  That's controlled by the permissions.  If the permissions are set to allow the users of this file to read/write to/from it, then ownership shouldn't make any difference.  I tried as best as I could from your description of the problem to duplicate your set up here.  I created a folder and called it "OurFolder" and set the permissions on it using your CACLS command.  I then dropped an XML file into it and again set the permissions using your CACLS command.  Last of all I changed the ownership.  To test opening the file I created a very short VB program that opens the xml file as you described.  It doesn't matter who ownership is set to I can open the file every time.  Is it possible that the xml file is being left open somehow, or locked, and that's what's accounting for the problem instead?  If you want to post more of your code, then I don't mind trying it out from here to see if I can duplicate the problem.  By the way, I tested this on a W2K server.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 10761809
Since my first comment I've had a few additional thoughts.  First, since the folder with the XML file is on an XP machine, use the effective permissions tab (file/folder properties, security tab, advanced, effective permissions) and verify that the user accounts have the necessary rights.  Second, have one of the users with a restricted account try to open the XML file with Notepad.  If they're successful, then the problem isn't a permissions issue.  Third, check the event logs on both the PC with the XML file and the PC the user is trying to open it from and see if there are any messages that might help figure out what the problem is.
0
 

Author Comment

by:410328
ID: 10763966
Thank you BlueDevilFan for your suggestions and good ideas!
After your comment I made a sample application with xml.save and xml.load wich created a file per user and opens it per user.
In Ourfolder that was changed with cacls I had no problems writing and reading.

So thats good news! So I had to find the problem somewhere else. I started digging in my source and discovered that I use a function (after I saved a xml-file with xml.save) that changes the layout of a xml-file. Usually a xml file looks like <data><Name>Jane</Name><Name>Charles</Name></data>
Because thats not good readable I made a function that opens it for input and saves it for output to a new file in the structure:
<data>
        <Name>Jane</Name>
        <Name>Charles</Name>
</data>
after that I renamed it to the origional file

Files changed in this way result in "the access denied"- error when read by another user

Skipping this function all files can be read, edit and saved by everyone!
So, thanks again for pointing me in the right way!
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question