From: Pavel Marakhovsky <_troggy_@mtu-net.ru> To: Linux Russian Mailing List <mandrake-russian@altlinux.ru> Subject: [mdk-re] offtopic: troubles with python programming Date: Sun Apr 8 22:12:01 2001 Message-ID: <20010408221040.75ed5315._troggy_@mtu-net.ru> (raw) Привет! Сразу сорри за оффтопик, но спросить не у кого... Из книжки "Язык прграммирования Питон" списан пример веб сервера с возможность выполнения cgi скриптов: #hins.py #!/usr/bin/python from BaseHTTPServer import HTTPServer from CGIHTTPServer import CGIHTTPRequestHandler import os os.chdir("/home/unatine/hins/html") serv=HTTPServer(('',80),CGIHTTPRequestHandler) serv.serve_forever() в /home/unatine/hins/html лежит index.html и есть каталог cgi-bin в котором лежит скрипт: unatine@localhost ~/hins $ ls -l ./*/* -rw-r--r-- 1 unatine unatine 314 Апр 8 16:44 ./html/index.html ./html/cgi-bin: итого 4 -rwxr-xr-x 1 unatine unatine 764 Апр 8 16:26 dict_cgi.py Ну то что сервер должен запускаться от рута это в принципе понятно (иначе ошибка создания сокета) index.html грузится, скрипт даже пытается выполниться, но говорит: localhost - - [08/Apr/2001 21:36:39] "POST /cgi-bin/dict_cgi.py HTTP/1.0" 200 - Traceback (most recent call last): File "/usr/lib/python2.0/CGIHTTPServer.py", line 211, in run_cgi os.execve(scriptfile, args, env) OSError: [Errno 13] Permission denied Какие права должны быть у скрипта и сервера, что бы нормально все выполнилось? Сейчас у сервера права: -rwxr-xr-x 1 unatine unatine 220 Апр 8 16:41 hins.py Людии.... помогите.... а то я уже совсем запутался... И еще... в книге написано что скрипты запускаются от nobody, но в python-docs по этому поводу ничего нет. -- WBW, Pavel e-mail: unatine@narod.ru "Books can be replaced; a prize student cannot. Be patient." ---Urza, to Barrin
next reply other threads:[~2001-04-08 22:12 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-04-08 22:12 Pavel Marakhovsky [this message] 2001-04-08 23:46 ` Ivan Zakharyaschev 2001-04-09 6:20 ` Pavel Marakhovsky 2001-04-09 11:14 ` cornet 2001-04-09 16:50 ` Alexander Bokovoy 2001-04-09 19:36 ` Pavel Marakhovsky 2001-04-09 22:24 ` Ivan Zakharyaschev 2001-04-09 22:24 ` Ivan Zakharyaschev 2001-04-19 18:01 ` Pavel Marakhovsky 2001-04-10 9:40 ` cornet 2001-04-10 19:05 ` Pavel Marakhovsky 2001-04-10 19:54 ` Ivan Zakharyaschev 2001-04-11 6:26 ` Pavel Marakhovsky 2001-04-10 19:06 ` Pavel Marakhovsky 2001-04-10 19:42 ` Sergey Vlasov 2001-04-11 6:25 ` Pavel Marakhovsky 2001-04-11 9:37 ` cornet 2001-04-11 18:56 ` Pavel Marakhovsky 2001-04-11 11:19 ` Sergey Vlasov 2001-04-11 18:56 ` Pavel Marakhovsky 2001-04-16 8:37 ` Mikhail Zabaluev 2001-04-16 20:02 ` Pavel Marakhovsky
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20010408221040.75ed5315._troggy_@mtu-net.ru \ --to=_troggy_@mtu-net.ru \ --cc=mandrake-russian@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git