简体   繁体   中英

PHP or Java Confirm if user has access to a specific folder on a network drive

When the user goes to a specific page on an internal network website I need to check if they user has access to a very specific network folder. I need something that operates like is_readable() but from the users system perspective and not from the server.

Basically if you have network priviledges to access a special folder then the site is accessable. If not you are denied access. It's a quick and dirty way to avoid a user login system. It piggy backs on the networks security without actually integrating with it.

I don't mind doing this in PHP or Java. Any ideas?

I think this can be done with jcifs , but you may need the password of the user.

Is a windows oder unix filesystem?

For windows you may call cacls c:\\path and parse the output for the usersname. But this is some kind of ugly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM