add a chdir call
This commit is contained in:
parent
86cc88f6bf
commit
aab8672229
3
esgd.py
3
esgd.py
|
@ -188,6 +188,7 @@ class GopherHandler(socketserver.BaseRequestHandler, GopherServerLogic):
|
|||
log = Logger()
|
||||
host = "localhost"
|
||||
port = 70
|
||||
location = "/tmp/test"
|
||||
|
||||
if __name__ == "__main__":
|
||||
switchgrp = grp.getgrnam("nobody").gr_gid
|
||||
|
@ -196,4 +197,6 @@ if __name__ == "__main__":
|
|||
os.setgid(switchgrp)
|
||||
os.seteuid(switchusr)
|
||||
log.log("switch user successful")
|
||||
os.chdir(location)
|
||||
log.log("change directory successful")
|
||||
server.serve_forever()
|
||||
|
|
Loading…
Reference in New Issue