RE: Directory permission bitwise operation help needed
Oh, that's a different story. If you are creating your own bit strings it's easy: Use constants in application.cfm to define what each bit means: etc... Then you can check them using this: relocate to DENIED page The only caveat here is that "client.permissions" must be an integer. If you want to store the bit string in the DB as a string then you'll have to convert it to an integer when the user logs in. Manipulation is also easy: start with a permission setting of 0 and use BitMaskSet(client.permissions,1,BIT_CANEDIT,1) to turn the bit on and BitMaskSet(client.permissions,0,BIT_CANEDIT,1) to turn it off Good luck! +---+ Bryan Love Macromedia Certified Professional Internet Application Developer Database Analyst Telecommunication Systems [EMAIL PROTECTED] +---+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis -Original Message- From: Brian Ferrigno [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 12:53 PM To: CF-Talk Subject: RE: Directory permission bitwise operation help needed Thanks for the reply Lewis. What I am looking for is a lot less complicatedthan CFX-Permissions and also necessary to run on both Windows and Linux. I basically want to be able to set a permissions string for a user in the database and use a mask to test if a certain bit string is set. If it is the user has permission to perform a certain action Ex. 10101010 permission string 0010 mask 0010 user has permission to perform this action I just wanted to know if there was anything more involved in this other than just doing the above masking operation. I'm sure there is, but it's Friday and I can only think about the weekend right now. I'll also take a look at your custom tag and bug you if I have any questions. Thanks for your help. Brian -Original Message- From: Lewis Sellers [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 3:34 PM To: CF-Talk Subject: Re: Directory permission bitwise operation help needed On Fri, 7 Jun 2002 11:41:55 -0700, in cf-talk you wrote: >I believe Lewis Sellers can help you. He has written CFX tags to manipulate >users and permissions. You'll find posts from him on this talk list... Yep. Though the phrase "I've forgotten more than you'll ever know" might apply here. Many moons and years ago I wrote a tag called CFX_Permissions for the IHTK (which is free now btw and open-sourced). CFX_Permissions lets you modify the permission settings of files and folders under NT. It also does extended directory listings which included the permissions for all the files/folders you tell it to look at. It also lists SIDs, and NT Account names for the owners of the files/folders. Very handy for web hosting and intranet security (hense it's inclusion in the Intranet/Hosting Toolkit. :). I don't offhand recall the exact bits you have to set for each of the permissions types... though I can tell you wasn't exactly a simple set up. We're talking something designed by microsoft here after all. But if you poke around the request.cpp in the cfx_permissions source everything should be there... in C though. If you don't understand how it works... just ask. I might remember how it worked. /-) --min __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Directory permission bitwise operation help needed
> I am trying to find a post from a few months ago about setting > folder permissions for a particular user using a byte length > string of 0s and 1s. You are then able to get a users' permission > to perform a certain action (edit/add/delete) by using bitwise > operations on the string. > > ex. a user permssion string of 01010101 would give the user > permission to edit files (this is a very generic example) > > Does anyone know where I can find the old topic or have any > advice on how to get started doing this? You might find this presentation helpful: http://www.figleaf.com/figleafhome/cfug/2000/CFUGJun2000/cfugjune2000.zip Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Directory permission bitwise operation help needed
Thanks for the reply Lewis. What I am looking for is a lot less complicatedthan CFX-Permissions and also necessary to run on both Windows and Linux. I basically want to be able to set a permissions string for a user in the database and use a mask to test if a certain bit string is set. If it is the user has permission to perform a certain action Ex. 10101010 permission string 0010 mask 0010 user has permission to perform this action I just wanted to know if there was anything more involved in this other than just doing the above masking operation. I'm sure there is, but it's Friday and I can only think about the weekend right now. I'll also take a look at your custom tag and bug you if I have any questions. Thanks for your help. Brian -Original Message- From: Lewis Sellers [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 3:34 PM To: CF-Talk Subject: Re: Directory permission bitwise operation help needed On Fri, 7 Jun 2002 11:41:55 -0700, in cf-talk you wrote: >I believe Lewis Sellers can help you. He has written CFX tags to manipulate >users and permissions. You'll find posts from him on this talk list... Yep. Though the phrase "I've forgotten more than you'll ever know" might apply here. Many moons and years ago I wrote a tag called CFX_Permissions for the IHTK (which is free now btw and open-sourced). CFX_Permissions lets you modify the permission settings of files and folders under NT. It also does extended directory listings which included the permissions for all the files/folders you tell it to look at. It also lists SIDs, and NT Account names for the owners of the files/folders. Very handy for web hosting and intranet security (hense it's inclusion in the Intranet/Hosting Toolkit. :). I don't offhand recall the exact bits you have to set for each of the permissions types... though I can tell you wasn't exactly a simple set up. We're talking something designed by microsoft here after all. But if you poke around the request.cpp in the cfx_permissions source everything should be there... in C though. If you don't understand how it works... just ask. I might remember how it worked. /-) --min __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Directory permission bitwise operation help needed
On Fri, 7 Jun 2002 11:41:55 -0700, in cf-talk you wrote: >I believe Lewis Sellers can help you. He has written CFX tags to manipulate >users and permissions. You'll find posts from him on this talk list... Yep. Though the phrase "I've forgotten more than you'll ever know" might apply here. Many moons and years ago I wrote a tag called CFX_Permissions for the IHTK (which is free now btw and open-sourced). CFX_Permissions lets you modify the permission settings of files and folders under NT. It also does extended directory listings which included the permissions for all the files/folders you tell it to look at. It also lists SIDs, and NT Account names for the owners of the files/folders. Very handy for web hosting and intranet security (hense it's inclusion in the Intranet/Hosting Toolkit. :). I don't offhand recall the exact bits you have to set for each of the permissions types... though I can tell you wasn't exactly a simple set up. We're talking something designed by microsoft here after all. But if you poke around the request.cpp in the cfx_permissions source everything should be there... in C though. If you don't understand how it works... just ask. I might remember how it worked. /-) --min __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Directory permission bitwise operation help needed
These help? http://www.swynk.com/friends/policht/Art042602.asp http://www.swynk.com/friends/policht/Art050602.asp http://www.swynk.com/friends/policht/Art051602.asp I've been wanting to play with this code forever, but I haven't had the chance yet...at least I got to polish off the bookmark. :) jon - Original Message - From: "Brian Ferrigno" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, June 07, 2002 3:05 PM Subject: RE: Directory permission bitwise operation help needed > Thanks Bryan for the tip. > > Do you know if there is another way to search the archives other than going > to http://www.mail-archive.com/cf-talk@houseoffusion.com/ ?? -- the posts > only go back to late May. > > I think Michael is doing some work on the archives...at least it appears he > is. > > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Directory permission bitwise operation help needed
Dunno... +---+ Bryan Love Macromedia Certified Professional Internet Application Developer Database Analyst Telecommunication Systems [EMAIL PROTECTED] +---+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis -Original Message- From: Brian Ferrigno [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 12:05 PM To: CF-Talk Subject: RE: Directory permission bitwise operation help needed Thanks Bryan for the tip. Do you know if there is another way to search the archives other than going to http://www.mail-archive.com/cf-talk@houseoffusion.com/ ?? -- the posts only go back to late May. I think Michael is doing some work on the archives...at least it appears he is. -Original Message- From: Bryan Love [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 2:42 PM To: CF-Talk Subject: RE: Directory permission bitwise operation help needed I believe Lewis Sellers can help you. He has written CFX tags to manipulate users and permissions. You'll find posts from him on this talk list... +---+ Bryan Love Macromedia Certified Professional Internet Application Developer Database Analyst Telecommunication Systems [EMAIL PROTECTED] +---+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis -Original Message- From: Brian Ferrigno [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 11:26 AM To: CF-Talk Subject: Directory permission bitwise operation help needed I am trying to find a post from a few months ago about setting folder permissions for a particular user using a byte length string of 0s and 1s. You are then able to get a users' permission to perform a certain action (edit/add/delete) by using bitwise operations on the string. ex. a user permssion string of 01010101 would give the user permission to edit files (this is a very generic example) Does anyone know where I can find the old topic or have any advice on how to get started doing this? Thanks in advance for your help Brian __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Directory permission bitwise operation help needed
Thanks Bryan for the tip. Do you know if there is another way to search the archives other than going to http://www.mail-archive.com/cf-talk@houseoffusion.com/ ?? -- the posts only go back to late May. I think Michael is doing some work on the archives...at least it appears he is. -Original Message- From: Bryan Love [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 2:42 PM To: CF-Talk Subject: RE: Directory permission bitwise operation help needed I believe Lewis Sellers can help you. He has written CFX tags to manipulate users and permissions. You'll find posts from him on this talk list... +---+ Bryan Love Macromedia Certified Professional Internet Application Developer Database Analyst Telecommunication Systems [EMAIL PROTECTED] +---+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis -Original Message- From: Brian Ferrigno [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 11:26 AM To: CF-Talk Subject: Directory permission bitwise operation help needed I am trying to find a post from a few months ago about setting folder permissions for a particular user using a byte length string of 0s and 1s. You are then able to get a users' permission to perform a certain action (edit/add/delete) by using bitwise operations on the string. ex. a user permssion string of 01010101 would give the user permission to edit files (this is a very generic example) Does anyone know where I can find the old topic or have any advice on how to get started doing this? Thanks in advance for your help Brian __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Directory permission bitwise operation help needed
I believe Lewis Sellers can help you. He has written CFX tags to manipulate users and permissions. You'll find posts from him on this talk list... +---+ Bryan Love Macromedia Certified Professional Internet Application Developer Database Analyst Telecommunication Systems [EMAIL PROTECTED] +---+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis -Original Message- From: Brian Ferrigno [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 11:26 AM To: CF-Talk Subject: Directory permission bitwise operation help needed I am trying to find a post from a few months ago about setting folder permissions for a particular user using a byte length string of 0s and 1s. You are then able to get a users' permission to perform a certain action (edit/add/delete) by using bitwise operations on the string. ex. a user permssion string of 01010101 would give the user permission to edit files (this is a very generic example) Does anyone know where I can find the old topic or have any advice on how to get started doing this? Thanks in advance for your help Brian __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists