собсно сабж
необходимо скриптом прочитать файл (работает)
внести изменения(работает)
и сохранить(не хватает прав)
как тут можно вьікрутиться?
раздать на директорию/файл “777” не прокатит.
wirednobody попадает только под other. Так что либо там не nobody, либо там всё для всех открыто.
cgi скрипт запускается от nobody
# -*- coding: utf-8 -*- from CGIHTTPServer import CGIHTTPRequestHandler from BaseHTTPServer import HTTPServer server_address = ("", 8000) server = HTTPServer(server_address, CGIHTTPRequestHandler) print "started httpserver..." server.serve_forever()
wiredНу, там это встроенное поведение, которое не меняется. Этот сервер не следует использовать, так как он вообще не защищён.
скрипт из оттуда запускается под nobody как и описано в документации
"""HTTP server classes.
Note: BaseHTTPRequestHandler doesn't implement any HTTP request; see
SimpleHTTPRequestHandler for simple implementations of GET, HEAD and POST,
and CGIHTTPRequestHandler for CGI scripts.
It does, however, optionally implement HTTP/1.1 persistent connections,
as of version 0.3.
Notes on CGIHTTPRequestHandler
------------------------------
This class implements GET and POST requests to cgi-bin scripts.
If the os.fork() function is not present (e.g. on Windows),
subprocess.Popen() is used as a fallback, with slightly altered semantics.
In all cases, the implementation is intentionally naive -- all
requests are executed synchronously.
SECURITY WARNING: DON'T USE THIS CODE UNLESS YOU ARE INSIDE A FIREWALL
-- it may execute arbitrary Python code or external programs.
Note that status code 200 is sent prior to execution of a CGI script, so
scripts cannot send other status codes such as 302 (redirect).
XXX To do:
- log requests even later (to capture byte count)
- log user-agent header and other interesting goodies
- send error log to separate file
"""
py.user.nextта то понятно, но поднимать что-то серьезное на той плате, где и так ресурсов не очень, не хотелось.
Этот сервер не следует использовать, так как он вообще не защищён.