473,789 Members | 2,833 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

read users permissions on files in the local network

20 New Member
please i need you'r help .. we are designing a web site and we need a critical code in php for security , we have to read users permissions on files in the local network ,to give them the real access and permissions also in their homes(on website) not just in thier work place (by local network security)so we have to read ldap file system ,but we can't find the code required ........
Jun 5 '07
22 2763
hamarsheh
20 New Member
as i said befor the function that returns file group id dosen't produce meaningful results on windows system, if you tried to print its value nothing is displayed .

someone suggested another way :
to use windows authentication , so when user tries to open a link it asks him for pw and user name , i have no idea how to implement it on php .

i'll look for applying this on php , but now i'll focus my search on getting group membership from ldap using php..
Jun 20 '07 #21
Motoma
3,237 Recognized Expert Specialist
Okay. If you find your solution, let us know what it is so others can learn from the knowledge you gain.
Jun 20 '07 #22
hamarsheh
20 New Member
thank you all ...
i now got all groups and all users and everything you need from ldap , there is afree class on internet adldap class ,here is the link :
http://adldap.sourceforge.net/download.php
there is many versions i used version 2.1 in the folder there is a file called examples you can uncomment any script to use it , it uses all function which are defined in adldap file(which is the class), examples.php includes the class , and starts using functions.

you have to open adldap class and edit the connect and bind functions and set them to you'r domain and user name and password.
you have to set you'r info in these lines in the adldap class in the constructor

//connect to the LDAP server as the username/password
$dc=$this->random_control ler();
if ($this->_use_ssl){
<Here!> $this->_conn = ldap_connect("m ydomain.com");
} else {
$this->_conn = ldap_connect($d c);
}

//bind as a domain admin if they've set it up
if ($this->_ad_username!= NULL && $this->_ad_password!= NULL){
<and here!>
$this->_bind = @ldap_bind($thi s->_conn,"user@my domain.com","pw ");


//bind as the user
<also here!>
$this->_bind = @ldap_bind($thi s->_conn,"user@my domain.com","pw ");
if (!$this->_bind){ return (false); }

and because the informations returned sometimes very larg you have to add this line in the begining of the class
ini_set("memory _limit","17M");
which gives 17 mega byte for results .
try it ! and if any one faces problems i'am glad to give any help.....
Jun 23 '07 #23

Sign in to post your reply or Sign up for a free account.

Similar topics

7
2471
by: TechBoy | last post by:
RE: Access 2002 SP3 I have an app "App1.mdb" that has internal security built-in via a table: tblSecurity. In this table a match is obtained to see if they are authorized to use the app. This application has no Jet security being used ("Users/Groups", etc.) One of the requirements was to hide the DBWindow completely from the users, which works fine and the DBwindow is secure from all users. Another requirement for App1.mdb: the users...
12
1975
by: Mark | last post by:
Hello, in a simple console application I try to create a file with some code like: FileStream file = new FileStream("test.txt", FileMode.OpenOrCreate, FileAccess.Write); StreamWriter sw = new StreamWriter(file); sw.Write("Hello"); sw.Close(); file.Close();
2
3373
by: Rick Strahl [MVP] | last post by:
I'm having problems with installation of a Web app on my Win 2003 server. I copy up the app configure the virtual. But when I access any ASPX pages I now get: CS0016: Could not write to output file 'd:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\company_mywebapp\e792bb5e\ed91474e\nupdhhtj.dll' -- 'Access is denied. '
2
3934
by: Michal Valent | last post by:
Hello, if I try to read a file on the mapped network drive, this error apears: Logon failure: unknown user name or bad password. How to set up permissions for IUSR_MACHINENAME on the mapped network drive? Thaks
5
13305
by: Mitchell S. Honnert | last post by:
Is there a way, given the full path of a folder on a network, that one can programatically tell if you have Read access to that folder? I have an application where the user is able to select a number of search folders using the standard dialog control. There shouldn't be an issue with the search folder being on a local drive or a network drive. But if you don't have Read access to the folder, there's trouble. The user can see the...
3
4824
by: James Maeding | last post by:
I am familiar with using My.Computer.FileSystem.GetDirectoryInfo to get folder attributes, see code below... This does not work though for network drives on my companies system. We use windows as our server, nothing exotic. I looked at the security permissions and the "write" box for domain users was grey, but not checked. This means read-only to me and sure enough, I cannot change the files. Is there a different way to deal with...
2
10696
by: Bill Fallon | last post by:
I have a VS2005 VB.Net windows form application deployed to a share drive. The windows explorer security permissions for this application (.exe) file is set for Everyone with List Folder/Read Data not allowed. This is done so that users cannot take away a copy of the .exe file. When I execute the ..exe from the client computer I get .Net Framework Initialization Error, Unable to find a version of the runtime to run this application. The...
8
3873
by: paquer | last post by:
Database Users need to have Read/Write etc... permissions to the folder where the Database resides in order to create the lock file. I have read only users. I have set up the Shortcut that links to the 'Workgroup Info File' with permissions for said database. Within this 'WIF' File I have "Read Only" user's who are only provided access to the DB only so they can view the data. Now if I give them full permissions to the folder where...
7
1454
by: =?Utf-8?B?SmVmZkRvdE5ldA==?= | last post by:
I have an asp.net application using a multi-page wizard control that grabs user selected files from a database and allows the user to configure parameters using controls on the wizard pages. The resultant files are then submitted for simulations. When I attempt to navigate through the wizard an exception is thrown because I am not permitted to overwrite a file in a read-only directory. When I uncheck the read-only on the folder...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9984
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.