LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2011, 09:41 AM   #1
RiskyShenanigan
LQ Newbie
 
Registered: Aug 2011
Posts: 2

Rep: Reputation: Disabled
Saving PHP scripts in htdocs with permission


I am trying to save PHP scripts from a textpad in Linux, however when I try to save it to a folder in htdocs, it says I need to permission. The only way I can think of putting it there is with the Terminal, is there an easier way to save directly?

Last edited by RiskyShenanigan; 08-20-2011 at 10:25 AM.
 
Old 08-20-2011, 10:16 AM   #2
moravia
LQ Newbie
 
Registered: Aug 2003
Distribution: primarily Red Hat
Posts: 13

Rep: Reputation: 0
http://catb.org/~esr/faqs/smart-questions.html

Your question lacks specific details, so I can only make educated guesses. The above page is a good read for how to make your questions better.

I'm guessing you're trying to save files in a system directory like /var/www/htdocs as a regular (not root) user. The correct solution to such a problem varies depending on your rights and goals on the system.

If your goal is to regularly edit files in the directory where you don't have permission, you probably want to give yourself permission. My preference is to set the group of the folder to something that makes sense (httpadmin web admin - pick a group name that works for you). Then add yourself to that group and set the permissions to g+rw for that group.

You didn't mention what distribution you're using, and I'm not familiar with Textpad for Linux. Specifics on adding groups and adding users to groups will vary by distribution. There are probably some common command line options that will work on *most* distributions, but I don't want to lead you too far astray without knowing your specifics and goals.
--
DrMoravia
 
0 members found this post helpful.
Old 08-23-2011, 03:35 AM   #3
salemeni
Member
 
Registered: Aug 2011
Posts: 64

Rep: Reputation: Disabled
Quote:
Originally Posted by RiskyShenanigan View Post
I am trying to save PHP scripts from a textpad in Linux, however when I try to save it to a folder in htdocs, it says I need to permission. The only way I can think of putting it there is with the Terminal, is there an easier way to save directly?
Because you don't have permission.
Code:
$ sudo gedit /var/www/htdocs/script.php
generics array

Last edited by salemeni; 12-06-2011 at 03:03 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
squirrelmail on openBSD, Permission denied (13) in /htdocs... sarajevo Linux - Server 8 05-12-2009 06:34 AM
Standby (power saving) and scripts/batch jobs taylorkh Linux - Newbie 2 05-20-2008 08:01 AM
Saving As... for Scripts compman9 Linux - Newbie 5 04-14-2008 02:01 PM
How do I call include statement in php, relative to htdocs root? drkstr Slackware 5 08-18-2006 10:37 PM
Couldn't open stream {localhost/imap : 143} in /usr/local/httpd/htdocs/view.php nshoboul Linux - Newbie 12 10-24-2003 02:23 PM


All times are GMT -5. The time now is 12:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration