Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

Can not access files under Interix

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Windows - UNIX Interop] >> System & Network Admin Forum >> Can not access files under Interix Page: [1]
Login
Message << Older Topic   Newer Topic >>
Can not access files under Interix - May 7, '03, 2:52:36 PM   
sharon

 

Posts: 11
Joined: Sep. 9, '02,
Status: offline
We have some files that were created by the anonymous ftp account under a directory that was created and used by our application running under Interix. When I try to see these files using the ' ls' command, I get Permission denied errors. So, I tried to ' chown' to my user account but I get Permission denied errors. I also tried the ' cacls' command but get Access is denied. (My user account is a member of the Administrators group. I also added my user account to the Backup Operators just to see if that would help.)

However, from a Windows explorer window, I can take ownership of these files. (I first get the security alert saying that I don' t have permission to view or edit.... but I can take ownership.) Is there anyway to do this via Interix? Occasionally our install scripts run into these same kind of permission problems and, if possible, I would like to be able to take care of them from within a script rather than forcing the installer to first make sure permissions are correct through Windows explorer.
Post #: 1
RE: Can not access files under Interix - May 7, '03, 3:40:03 PM   
markfunk

 

Posts: 670
Joined: Mar. 31, '03,
Status: online
did you try the " chown" as a local Administrator ?
You can use " su +Administrator" or " login +Administrator"

mark

(in reply to sharon)
Post #: 2
RE: Can not access files under Interix - May 8, '03, 10:00:31 AM   
sharon

 

Posts: 11
Joined: Sep. 9, '02,
Status: offline
Yes. I have tried su' ing to Administrator and I get the same error. What confuses me is that I am able to do this through the Windows Explorer as any member or the Adminstrator group.

(in reply to sharon)
Post #: 3
RE: Can not access files under Interix - May 8, '03, 10:38:02 AM   
jimraf

 

Posts: 17
Joined: Apr. 22, '03,
From: Boston, MA
Status: offline
Sharon,

The " takeown" utility from Microsoft might be of help. It strips the ACL from a file.

I think it' s distributed in the recent (Windows 2000) Resource Kits, and as part of the VC6 samples. A search for " takeown" on msdn.microsoft.com should turn it up.

Jim

(in reply to sharon)
Post #: 4
RE: Can not access files under Interix - May 8, '03, 12:19:22 PM   
markfunk

 

Posts: 670
Joined: Mar. 31, '03,
Status: online
quote:

ORIGINAL: sharon

Yes. I have tried su' ing to Administrator and I get the same error. What confuses me is that I am able to do this through the Windows Explorer as any member or the Adminstrator group.


==================
Explorer allows you to ' take ownership' .
chown allows you to ' change ownership'
These are not the same thing.

I think the problem is that when anon ftp created a file it created it with a limited number of ACEs. Probably just one ACE that allows access to anon ftp only. This will prevent Interix from displaying any file information (ie " ls -l" ) and chown/chmod currently won' t work.
I would appear that Interix has a bug that doesn' t handle this situation very well (ie. it' s not passing the correct parameters (to ZwCreateFile()?) when opening the file). Interix does try to use the Windows privileges to perform operations for the caller, but in this case its not doing something properly.

Using the Windows ' takeown' utility as Administrator or as a member of Administrators group, could work for you.
Takeown does 2 things: a) changes the owner of the file to " Administrators" and b) removes all ACEs so the file is completely unprotected.
At this point you can use Interix to chown(1) and chmod(1) the file to whatever ownership and permissions you desire.

(in reply to sharon)
Post #: 5
Page:   [1]
All Forums >> [Windows - UNIX Interop] >> System & Network Admin Forum >> Can not access files under Interix Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.031