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


All times are GMT. The time now is 01:28 AM.

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.00951 seconds
  • Memory Usage 1,725KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete