vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   chmod directory threw php ? (https://vborg.vbsupport.ru/showthread.php?t=43564)

chad777 09-15-2002 09:08 AM

chmod directory threw php ?
 
I am working on a hack for vbulletin and another program integration. The only problem I am having is

I run this command in one of the scripts:

PHP Code:

chmod ("$p_directory/dir i am making"0755); 

but I get and error like this when testing the script

Warning: chmod failed: Operation not permitted on line xx

is there another command I can use to chmod ?

or do I have to do something to my server to allow php to chmod ?

Any ideas will help thanks

assassingod 09-15-2002 09:23 AM

Cant you just CHMOD the directory through your FTP?

chad777 09-15-2002 09:25 AM

yeah I probadly could but for this script to work it has to beable to chmod threw the script in order to make a directory for the user

assassingod 09-15-2002 09:27 AM

Oh I see:p

Sorry, I dont kno anymore (PHP Beginner)

chad777 09-15-2002 09:30 AM

Yeah I am too ...this will be my first full script ever doing kinda easy when you do enough research then you run into little problems that just get you so well lol you know.

everything works great except for this part :(

Kind of a bummer if I can't that part working :(

assassingod 09-15-2002 09:33 AM

Stupid question but does $p_directory exsist for your hack? Maybe thats why it doesnt work?

chad777 09-15-2002 09:35 AM

:) yeah it exsist ...I also tried just make it without a varible

like /home/name/bla/dir

but that don't work either :(

assassingod 09-15-2002 09:39 AM

I was just about to suggest replacing the varible with the proper dir name. *Cant think of anything else*

chad777 09-15-2002 06:53 PM

That makes a direcory in the web dir (like public_html)right ?

This will be making a directory outside the public like in the /etc dir.

DrkFusion 09-15-2002 06:59 PM

I made the script do this
Lets pretend I name the sub food, so i put food in the field of the form and press submit and then the script does the following

Make a directory in /home/ called food,
then makes a folder in /home/food/ called public_html and chmods both of those folders to 777, and then in the directory

/home/food/public_html/ it creates a file called index.html that says The Subdomain food has been successfully created.

I have a live demo for you if you want.

Regards
Drk

chad777 09-15-2002 07:13 PM

yeah that might work ....let me try real quick

chad777 09-15-2002 07:34 PM

nope didn't work. It is not making a directory in the web root :(

i am not trying to make a dir. see able by web users.

here I will show you the code
PHP Code:

chmod ("$p_directory/passwd"0755);
chmod ("$p_directory/shadow"0755);
chmod ("$p_directory/quota"0755); 

it is actually chmoding those files ! :)

this is for v2.0 of my neomail login hack.

this will let people sign and have there webmail accoutn created auto.

yes there is more then just that to this script, but that is what I am trying to do as of now

chad777 09-15-2002 07:36 PM

$p_directory is a dir. that is specified early in the script

chad777 09-15-2002 07:39 PM

well on my servers i have openwebmail and neomail. every user account gets neomail by default.

chad777 09-15-2002 07:54 PM

so could i change ownership with the script ? I wouldn't really wnat to do that it seems like it would security risk :(

maybe i should just make something that would post to a private forum that they want and email address and then just make it and give them a link to the login script once it is created :(

chad777 09-15-2002 08:28 PM

how to change ownership?

DrkFusion 09-15-2002 08:33 PM

I think its like chown();

Not sure on that, but It should be that.

chad777 09-15-2002 08:40 PM

k :) i will tell you if it works :) i think i am going to take a break for now


All times are GMT. The time now is 09:38 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01137 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete