# Checking permissions for config files

**URL:** <https://www.ruby-forum.com/t/checking-permissions-for-config-files/119702>\
**Category:** Ruby\
**Created:** [November 9, 2007, 11:48am UTC](https://www.ruby-forum.com/t/checking-permissions-for-config-files/119702 "2007-11-09T11:48:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jazcyk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e56c9b/32.png) [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Post date:** [November 9, 2007, 11:48am UTC](https://www.ruby-forum.com/t/checking-permissions-for-config-files/119702/1 "2007-11-09T11:48:25Z")

</div>

I have been trying to find a class that can take in a file path and  
another argument like group id or read write permissions for different  
people like root, group and other. The only class i can find that does  
anything near that is the file or fileutils class but they can just set  
groupids etc or check to see if the person running the process has read  
or write privileges to the file in question.  
Im just wondering then is there anyother classes that can help me out  
with my checks?  
thanks in advance  
Loftz

---

<div class="post-metadata">

**Author:** ![jazcyk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e56c9b/32.png) [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Post date:** [November 9, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/checking-permissions-for-config-files/119702/2 "2007-11-09T19:49:52Z")

</div>

On Nov 9, 2007 5:48 AM, Peter L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have been trying to find a class that can take in a file path and  
> another argument like group id or read write permissions for different  
> people like root, group and other. The only class i can find that does  
> anything near that is the file or fileutils class but they can just set  
> groupids etc or check to see if the person running the process has read  
> or write privileges to the file in question.  
> Im just wondering then is there anyother classes that can help me out  
> with my checks?  
> thanks in advance  
> Loftz

Well, you mentioned what you want the method to take as arguments, but  
what should it return? What are you checking?

-A

---

<div class="post-metadata">

**Author:** ![jazcyk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e56c9b/32.png) [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Post date:** [November 14, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/checking-permissions-for-config-files/119702/3 "2007-11-14T16:10:48Z")

</div>

Alex LeDonne wrote:

> On Nov 9, 2007 5:48 AM, Peter L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I have been trying to find a class that can take in a file path and  
> > another argument like group id or read write permissions for different  
> > people like root, group and other. The only class i can find that does  
> > anything near that is the file or fileutils class but they can just set  
> > groupids etc or check to see if the person running the process has read  
> > or write privileges to the file in question.  
> > Im just wondering then is there anyother classes that can help me out  
> > with my checks?  
> > thanks in advance  
> > Loftz
> 
> Well, you mentioned what you want the method to take as arguments, but  
> what should it return? What are you checking?
> 
> -A

Like lets just say one of the functions checks the directory /var and  
finds out if ‘other’ has r-x privileges so then that function returns  
either true or false if it does then true if it doesnâ€™t then it returns  
false.  
I just want to know if there is a class in a library that might have  
something already like that so I donâ€™t have to waste my time and look  
into how I might write one up

cheers  
Loftz
