#1
  1. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    15
    i am trying to find a simple way to restrict a user to his/her directory when using a specific script (i.e. they should not be able to move to another directory above their home directory).
    any suggestions?
  2. #2
  3. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    15
    nevermind...i got it.
  4. #3
  5. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    how'd you get it?
  6. #4
  7. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    15
    $dirname = (getpwuid($> ))[7];
    unless ($placetogo =~ /^$dirname/)
    {
    print "Access Denied";
    other code here.....
    }
    I was spoofing the regex, which seems impossible to do, but i found a way.

IMN logo majestic logo threadwatch logo seochat tools logo