Read/Write access problem with a file on Win2000 Server from Win2000 Workstation

G

Greg Doherty

Hi,

I have a Win2000 Server with a document file created by an MFC MDI
application. This file can be edited by a client on a WinXP Pro machine,
but when that same user logs in from a Win2000 client he gets an "Access to
\\server\share\file.mnt was denied" message. The user belongs to a user
group which has all access except "Take Ownership" and "Change Permissions".
The Win2000 client can create a new file, but is unable to modify an
existing file.

Any idea why there is a difference when the same user is using a Win2000
client rather than a Win XP client? How can I fix this without changing the
access rights?

The actual code being executed to open the file is:

CFileException fe;

CFile* pFile = NULL;

pFile = GetFile(lpszPathName, CFile::modeCreate |

CFile::modeReadWrite | CFile::shareExclusive, &fe);



This code is from the MFC method:

BOOL CDocument::OnSaveDocument(LPCTSTR lpszPathName)



Thanks,

Greg
 
A

Alex Zhang

Hello Greg,

Thank you for posting here.

If you use the same user to logon as Windows 2000 and XP and access the
shared folder via UNC, does the issue occur?

Thanks and regards,

Have a nice day!
Alex Zhang
Microsoft Partner Online Support
Get Secure! - www.microsoft.com/security

=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Greg Doherty" <[email protected]>
| Newsgroups:
microsoft.public.win2000.security,microsoft.public.vc.mfc,microsoft.public.v
c.mfc.docview
| Subject: Read/Write access problem with a file on Win2000 Server from
Win2000 Workstation
| Date: Fri, 2 Apr 2004 13:58:46 -0800
| Organization: Posted via Supernews, http://www.supernews.com
| Message-ID: <[email protected]>
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| X-Complaints-To: (e-mail address removed)
| Lines: 37
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!newsfeed.wirehub.nl!news2.euro.net!62.253.162.219.MISMATCH!newsrout1.nt
li.net!news.ntli.net!sn-xit-02!sn-xit-01!sn-post-01!supernews.com!corp.super
news.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.vc.mfc:412674
microsoft.public.vc.mfc.docview:22475
microsoft.public.win2000.security:24673
| X-Tomcat-NG: microsoft.public.win2000.security
|
| Hi,
|
| I have a Win2000 Server with a document file created by an MFC MDI
| application. This file can be edited by a client on a WinXP Pro machine,
| but when that same user logs in from a Win2000 client he gets an "Access
to
| \\server\share\file.mnt was denied" message. The user belongs to a user
| group which has all access except "Take Ownership" and "Change
Permissions".
| The Win2000 client can create a new file, but is unable to modify an
| existing file.
|
| Any idea why there is a difference when the same user is using a Win2000
| client rather than a Win XP client? How can I fix this without changing
the
| access rights?
|
| The actual code being executed to open the file is:
|
| CFileException fe;
|
| CFile* pFile = NULL;
|
| pFile = GetFile(lpszPathName, CFile::modeCreate |
|
| CFile::modeReadWrite | CFile::shareExclusive, &fe);
|
|
|
| This code is from the MFC method:
|
| BOOL CDocument::OnSaveDocument(LPCTSTR lpszPathName)
|
|
|
| Thanks,
|
| Greg
|
|
|
 
G

Greg Doherty

Hi Alex,
Thanks for responding.

The problem is the same whether the user is accessing the shared folder via
UNC or mapped drive. The same user whether logged on to Win2000 or XP can
create a document with this app, but when using Win2000 he is unable to make
changes to that document (Access denied).

Other programs such as Notepad work fine. Only this MFC application has a
problem.

Regards,
- Greg
 
A

Alex Zhang

Hello Greg,

It appears that this is a development-related request that would best be
best addressed in the developer newsgroups. The developer newsgroups are
located at:

http://msdn.microsoft.com/newsgroups/default.asp


Have a nice day!

Thanks and regards,

Alex Zhang
Microsoft Partner Online Support
Get Secure! - <www.microsoft.com/security>
=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Greg Doherty" <[email protected]>
| Newsgroups: microsoft.public.win2000.security
| Subject: Re: Read/Write access problem with a file on Win2000 Server from
Win2000 Workstation
| Date: Mon, 5 Apr 2004 10:45:09 -0700
| Organization: Posted via Supernews, http://www.supernews.com
| Message-ID: <[email protected]>
| References: <[email protected]>
<[email protected]>
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| X-Complaints-To: (e-mail address removed)
| Lines: 79
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-04!sn-
xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.win2000.security:24741
| X-Tomcat-NG: microsoft.public.win2000.security
|
| Hi Alex,
| Thanks for responding.
|
| The problem is the same whether the user is accessing the shared folder
via
| UNC or mapped drive. The same user whether logged on to Win2000 or XP can
| create a document with this app, but when using Win2000 he is unable to
make
| changes to that document (Access denied).
|
| Other programs such as Notepad work fine. Only this MFC application has a
| problem.
|
| Regards,
| - Greg
|
|
| | > Hello Greg,
| >
| > Thank you for posting here.
| >
| > If you use the same user to logon as Windows 2000 and XP and access the
| > shared folder via UNC, does the issue occur?
| >
| > Thanks and regards,
| >
| > Have a nice day!
| > Alex Zhang
| > Microsoft Partner Online Support
| > Get Secure! - www.microsoft.com/security
| >
| > =====================================================
| > When responding to posts, please "Reply to Group" via your newsreader so
| > that others may learn and benefit from your issue.
| > =====================================================
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > --------------------
| > | From: "Greg Doherty" <[email protected]>
| snip..
| > |
| > | Hi,
| > |
| > | I have a Win2000 Server with a document file created by an MFC MDI
| > | application. This file can be edited by a client on a WinXP Pro
| machine,
| > | but when that same user logs in from a Win2000 client he gets an
"Access
| > to
| > | \\server\share\file.mnt was denied" message. The user belongs to a
user
| > | group which has all access except "Take Ownership" and "Change
| > Permissions".
| > | The Win2000 client can create a new file, but is unable to modify an
| > | existing file.
| > |
| > | Any idea why there is a difference when the same user is using a
Win2000
| > | client rather than a Win XP client? How can I fix this without
changing
| > | the access rights?
| > |
| > | The actual code being executed to open the file is:
| > |
| > | CFileException fe;
| > | CFile* pFile = NULL;
| > | pFile = GetFile(lpszPathName, CFile::modeCreate |
| > | CFile::modeReadWrite | CFile::shareExclusive,
| &fe);
| > |
| > |
| > |
| > | This code is from the MFC method:
| > | BOOL CDocument::OnSaveDocument(LPCTSTR lpszPathName)
| > |
| > | Thanks,
| > | Greg
| > |
| > |
| > |
| >
|
|
|
 

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