Question about The PHP Group PHP

2 Answers

PHP Trouble I'm trying to create a directory with full access rights, used his script ? mkdir($dirpath,0777) I on;y get access permission 755. What's the problem?

Posted by on

2 Answers

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Governor:

    An expert whose answer got voted for 20 times.

    Hot-Shot:

    An expert who has answered 20 questions.

  • Expert
  • 30 Answers

Did you try quoting the directory path?

mkdir("/path/to/directory",0777);


`mkdir --mode=777 $dirpath`;

or/

`mkdir -m 777 $dirpath`;

Posted on Sep 02, 2008

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Vice President:

    An expert whose answer got voted for 100 times.

  • Master
  • 659 Answers

$path="yourdirectory";
$dh = opendir($path);
while ($temp = readdir($dh)) {
if ($temp!='.' && $temp!='..' && $temp!='.htaccess') chmod($temp,777); }

Posted on Aug 05, 2008

×

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

2 Answers

It says it cant cresat the directory C:\Users\n\appdata


Try running the software as Administrator; right click on the exe or shorcut and choose "Run As Administrator. That should hopefully solve the issue.
if it doesn't, what software are you trying to run?

Mar 01, 2011 | Computers & Internet

Tip

How to Mount storage devices automatically on linux


Hi..
This will be nice that all your local Hard drives are mounted automatically during the boot. This can be achieved by modifying "fstab" (File System TABle) file. This file is located on /etc/ which would need superuser permissions(root user password) to modify.

How we can alter fstab and set system to mount partitions by itself is explained below..

  1. First Open a terminal and type blkid and press <Enter>
    this will show your local Hard disks with their UUIDs( Universal Unique IDentification). This may look like this

    nightflare.png
    here 1st column with /dev entries are the links of partitions(in the format /device/<Partition No.>
    2nd column : LABEL describes the Name or Label of partitions. Not all partitions necessarily needs a Label.
    3rd column starting with UUID is the entry shows the UUIDs of the Partition
    4th column shows the File system used in the partitions

  2. So Now we know some important informations about our partitions like their File system type and UUIDs. In linux to use a filesystem, we need to mount it in somewhere in the root directory. This is because of the Hierarchy nature of Linux .

    Usual location of mounted file systems are on /mount/ or /mnt/. I take /mount/ as my default Mount location. Create a new folder with a name(Without any space between words, ex: New_Partition) simillar to Partiton Label or No

    To create folders in /mount/ , we need root permissions.
    Open a terminal and type su and press <Enter>. It will ask for root password. type in root password and press enter.

    Then type mkdir -v /media/<Dir Name>
    ex.: If you want to create New_Drive in /media/ then type mkdir -v /media/New_Drive
    You can also create multiple folders in one step
    ex. You want to create Drive1, Drive2 , Drive3 then you need to type as
    mkdir -v /media/Drive1 /media/Drive2 /media/Drive3

    You may get as this
    nightflare_0.png

    Now we created mount points needed to mount the filesystems

  3. Now we need to modify fstab file .
    Default location of fstab is /etc/fstab

    nightflare_1.png

    On terminal ( where we typed commands to create folders in /media)
    Before we start editing fstab file, lets make a backup copy of it

    Type on terminal cp -v /etc/fstab /etc/fstab.backup and press <Enter>. You should see as below.

    nightflare_5.png

    type sudo gedit & and press <Enter>

    This will open text editor. Click on Open and point it to /etc/fstab

    nightflare.jpg

    It will Open fstab file. This may look like this

    nightflare_3.png

    Any entry starting with #, will not taken into account. So you can use # for commenting

    Basic structure of fstab file is


    <File System Address> <Mount Point> <Filesystem Type> <Options> <Dump> <Pass>


    File System Address --> Its is the Identifier for the file system. You can use either Links (ex.: /dev/sda2) or Labels (ex.: LABEL="DRIVE1") or UUIDs (ex.: UUID="74c9c3d9-a374-406d-ba41-e030c7d35f5d")


    Mount Point --> This is folder on which the file system mounts. (Refer Step 2) (ex.: /media/Drive2)


    File System Type --> specify the file system (ex ext3, ntfs, fat)


    Options --> Contains more complicated options
    For normal user, its good to set Defaults as Options


    Dump --> set whether to Backup or not. (ex. 0, 1)


    Pass --> set whether to check filesystem before mounting


    example of a edited fstab file is


    nightflare_4.png


    After finishing with fstab save it. You may get errors if you don't have permissions to alter fstab. In that case, Open a terminal and type su and press <Enter> and provide Password for root account. and <Enter>
    Then type gedit &.

  4. After saving the file , restart the system, if everything go just good as expected the computer boots up with local partitions mounted on specified locations


If you got any doubts , please contact me

on Mar 18, 2011 | Computers & Internet

Tip

Take ownership of a folder in Microsoft Windows


<span> <p> <p><span>In order to take ownership of an special folder so you can write and create files within follow this steps</span><br /> <p><span>1. Right-click the file or folder, click<span> </span><b>Properties</b>, and then click the<span> </span><b>Security</b><span> </span>tab.</span><br /> <p><span>2. Click<span> </span><b>Advanced</b>, and then click the<span> </span><b>Owner</b><span> </span>tab.</span><br /> <p><span>3. Click<span> </span><b>Edit</b>.</span><br /> <p><span>4. In the<span> </span><b>Change owner to</b><span> </span>box, click the new owner.</span><br /> <p><span>5. If you want to take ownership of the subfolders, select the<span> </span><b>Replace owner on subcontainers and objects</b><span> </span>check box.</span><br /> <p><span>6. Click<span> </span><b>OK</b>, and then click<span> </span><b>Yes</b><span> </span>when you receive the following message:</span><br /> <p><i><span>You do not have permission to read the contents of directory folder name. Do you want to replace the directory permissions with permissions granting you Full Control?</span></i><span></span><br /> <p><i><span>All permissions will be replaced if you click<span> </span><b>Yes</b>.<br /> </span></i><span>7. Click<span> </span><b>OK</b>, and then reapply the permissions and security settings that you want for the folder and its contents. </span><br /><br /></span>

on Mar 01, 2011 | Computers & Internet

1 Answer

The message light on the MD110 is not working. I think I pressed something that disabled it. How to I get it back on?


detail_no-screenshot.gif Erlang R11B
Erlang is a full-featured programming language developed at the Ericsson CS Laboratory. more>> Erlang is a programming language designed at the Ericsson Computer Science Laboratory.
Open-source Erlang is being released to help encourage the spread of Erlang outside Ericsson.
Installation
When installed, the entire system, except for a small start-up script, resides in a single directory tree. The location of this directory tree can be chosen arbitrarily by the installer, and it does not need to be in the users $PATH.
The only requirements are that the file system where it is placed has enough free space, and that the users who run Erlang/OTP have read access to it. In the example below, the directory tree is assumed to be located at /usr/local/erlang, which is here called the top-level directory.
It is assumed that you have the compressed tar file, the name of which is < PREFIX >.tar.gz, where < PREFIX > is a string denoting the particular Erlang/OTP release, e.g. otp_LXA_11930_sunos5_R9B.
Wherever the string < PREFIX > is used below, it should be replaced by the actual name prefix of the compressed tar file.
The tape archive file does not have one single directory in which all other files are rooted. Therefore the tape archive file must be extracted into an empty (newly created) directory.
1. If the top-level directory does not already exist, create it:
mkdir /usr/local/erlang
2. Change the current directory to the top level directory:
cd /usr/local/erlang
3. Create the installation directory with an appropriate name. For example:
mkdir otp_r7b
4. Change to the installation directory, e.g.
cd otp_r7b
5. Assuming the compressed tar file resides in the directory ,. extract the compressed tar file into the current directory:
gunzip -c / .tar.gz | tar xfp -
6. Read the README file in the installation directory for last minute updates, before proceeding.
7. Run the Install script in the installation directory, with the absolute path of the installation directory as argument,
./Install /usr/local/erlang/otp_r7b
and supply answers to the prompts.
In most cases, there is a default answer in square brackets ([]). If the default is satisfactory, just press . In general you are only prompted for one thing:
- "Do you want to use a minimal system startup instead of the SASL startup?"
In a minimal system, only the Kernel and STDLIB applications are loaded and started. If the SASL startup is used, the SASL application is included as well. Normally, the minimal system is enough.
8. Make Erlang/OTP available for users, either by putting the path /usr/local/erlang/otp_r7b/bin in users $PATH variable, or link the executable /usr/local/erlang/otp_r7b/bin/erl accordingly, e.g.:
ln -s /usr/local/erlang/otp_r7b/bin/erl /usr/local/bin/erl
Enhancements:
- Among other things, SMP support was added.
<<less Download (10.3MB) Added: 2006-05-18 License: GPL (GNU General Public License) Price: 1259 downloads

Mar 05, 2010 | Lands Phones

1 Answer

NO PERMISSION TO EDIT OR VIEW As an administrator, I thought I have all the privileges to edit, view read, modify, execute and write any folder, but on certain folders I must first grant myself the...


you need to Take ownership of those files...
For Files:

takeown /f file_name /d y
icacls file_name /grant administrators:F
For Folders or Directories (will perform action recursively):
takeown /f directory_name /r /d y
icacls directory_name /grant administrators:F /t
Replace file_name or directory_name with actual file name or folder name, with path when applicable. The first command will take ownership of the file or folder specified, and the second command will grant full control permissions to administrators user group. Note that when using command for folders, to command will run recursively. To prevent the task been perform recursively, remove the “/r” and “/t” switch.
Above two commands have been scripted in Windows command shell batch script that easily perform the task of taking ownership and grant full control permissions to Administrators user group by typing simple command. Alternatively, users can add “Take Control Of” option to right click menu so that the next time you need to take control of a file with full control permissions, it’s just a one click task.

Feb 04, 2010 | Acer Aspire™ T180 PC Desktop

10 Answers

Error 101 (net::ERR_CONNECTION_RESET): Unknown error. I use Google Chrome and I get the above message - whenever I try to log onto Facebook on my laptop I have cleared all offline content and swept up...


sometime get me error 101, when I try to open only Gmail site in IE, Google crome & when I try to after 15 mints its opening. Give me below error:
Error 101 (net::ERR_CONNECTION_RESET): Unknown error
plz help me

Sep 10, 2009 | Google Chrome

1 Answer

I recently installed Leopard 1.5.6 running on a iBook 1.2 GHz PowerPC G4. The software worked fine for a while. I am unable to open files, folders, applications, using the touch pad or external mouse. Can...


Try unlocking them by clicking the lock icon, it would ask for admin password. Each read write permission to yourself.

If this doesn't work, try creating a new super user account on your machine and run Disk utility and ask it to repair your file permission. Launch terminal and type this.

find . -type d -exec chmod 777 {} \;
find . -type f -exec chmod 777 {} \;

or you can try

cd /Volumes

this would display volume name.

chmod 0777 volumeName


May 15, 2009 | Apple Mac OS X v10.5 Leopard for Single...

1 Answer

Using Panasonic RR-US430 voice recorder. Cannot transfer files from recorder to computer using Voice Editing software. Get msg: media is write-protected. Files are not locked. Using Vista 32 bit.


i found another alternative to this - using cmd - subst <drive_letter>: C:\<YourWorkingDirectory>
make sure the user or allusers have full permissions to this directory.

in the voice media menu, your drop down menu will now have this drive to work with or from.

Important - this method is a virtual drive not an actual long term mapped drive - meaning - when you log off or restart the machine - cmd method will have to be executed again - i created a script that does it for me and then launches the application - its easier that way.

also, if this does not work then make the working dir a share with all users permissions on it and network map a drive letter to it (not a virtual mapping) - then add this share to your alias and registry paths instead

hope this helps

Jun 19, 2008 | Audio Players & Recorders

3 Answers

How to set a folder with small program to run on linux+apache


Dear Rajiv

First make sure that your Apache server is running properly.
For this type http://localhost and see the result.

If you want to test PHP you can create a php test file by yourself.

Goto the www folder in apache director. create a file , name it anything.php. Edit the file and simply write "phpinfo()" without quotes . check the output.

It means that your apache server is fully capable of PHP scripting.

Cheers, Parveen

Jan 25, 2008 | Computers & Internet

Not finding what you are looking for?
The PHP Group PHP Logo

Related Topics:

2,884 people viewed this question

Ask a Question

Usually answered in minutes!

Top The PHP Group Computers & Internet Experts

dhnguyen

Level 2 Expert

278 Answers

Computer Links

Level 3 Expert

2385 Answers

Mike

Level 3 Expert

4334 Answers

Are you a The PHP Group Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...