LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-25-2004, 01:52 AM   #1
xstealthrtx
Member
 
Registered: Nov 2004
Posts: 31

Rep: Reputation: 15
How can I change files and save as...


i'm running suse 9.1

ok, i've successfully compiled apache and have it running. but i need to obviously edit and add files in my root directory but 'it' (linux) isn't letting me do this. i know how to edit files by using vi. but i want to change the index file and add others and i don't know how. btw, the directory that the server looks in to publish files is /usr/local/apache2/htdocs i need to edit this directory!!!!!!!!!!
 
Old 12-25-2004, 02:07 AM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
How is it *not* letting you add files? Do you have proper permissions on 'htdocs'? You can copy files to that directory with 'cp' command or create new files with 'vi'.

-twantrd
 
Old 12-25-2004, 03:40 AM   #3
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Rep: Reputation: 30
Did you try editing it with root?
 
Old 12-25-2004, 11:09 AM   #4
xstealthrtx
Member
 
Registered: Nov 2004
Posts: 31

Original Poster
Rep: Reputation: 15
I can edit files under root with vi. i have no idea how to add stuff to the folder. for example, i make an index file of my own. i want to paste it into the folder. won't let me do that. and i'm not going to use the konsole to edit stuff all the time, that's stupid. what am i going to do when i need to ftp in to the folder using an ftp client.

it just keeps saying access denied. i don't know what i need to do for permissions. i added my user name to the root group but that did nothing.
 
Old 12-25-2004, 02:34 PM   #5
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Code:
i want to paste it into the folder. won't let me do that
What command are you issuing to "paste" your new index.html into the docroot folder? If say you created a new index.html and want that file to be copied into the folder, then "cp" is the command:

cp index.html /usr/local/apache2/htdocs/

Code:
what am i going to do when i need to ftp in to the folder using an ftp client.
Simple. Create an ftp account and make the home path of that to "/usr/local/apache2/htdocs" Also, make sure that the FTP account has 'w'rite permission on htdocs. That's it.

-twantrd
 
Old 12-25-2004, 04:21 PM   #6
xstealthrtx
Member
 
Registered: Nov 2004
Posts: 31

Original Poster
Rep: Reputation: 15
my biggest thing is how do i change folder permissions. everyone is like, 'make sure your permissions are set' well i have no clue how to do that. i've added my name 'owen' into multiple different groups like root and such and i still can do crap with the folders. i don't want to have to go into the konsole every single time i want to make a new folder or move files around. i just want to right-click > new folder.
 
Old 12-25-2004, 09:11 PM   #7
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
If you do a ls -al, you will see something like:

drwxr-xr-x 68 root root 4096 Dec 23 18:51 etc
drwxr-xr-x 2 root root 4096 Jan 29 2004 floppy

Ok, the d flag stands for directory. The first rwx means that only the owner (root) of the file can 'r'ead, 'w'rite, and e'x'ecute. The 2nd r-x means that anyone in the group (root) can read and execute. The third r-x means that "others" (anyone that doesn't own or is in the group) can read and execute.

Perhaps your situation is that the username 'owen' is in group 'root' however, there is no 'w' flag for directory "htdocs" that is why username 'owen' CANNOT write files in that directory. To change permissions on files/directories you need to become root and then look at the command 'chmod'. I would tell you the options for chmod but then you wouldn't learn exactly how it works. Anyhow, play with chmod and if you still have problems then post back. We are welcome to help.

Code:
'make sure your permissions are set' well i have no clue how to do that
You should've told this to us in the beginning. We assumed that you knew how to check the permissions .

-twantrd
 
Old 12-26-2004, 02:30 AM   #8
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Rep: Reputation: 30
Quote:
my biggest thing is how do i change folder permissions. everyone is like, 'make sure your permissions are set' well i have no clue how to do that.
Try

Code:
man chmod
 
  


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
OpenOffice 2.0: can't save files ltd602 Linux - Software 3 03-31-2005 04:05 PM
change default save directory canyon289 Linux - Software 1 10-24-2004 01:16 AM
resolution change does not save??? dgr72371 Linux - Laptop and Netbook 5 04-26-2004 06:01 PM
LimeWire won't let me change the save dir. aramh Linux - Software 1 03-13-2004 07:54 PM
change distro - save files? davedenis Linux - Software 6 03-11-2004 06:11 AM


All times are GMT -5. The time now is 10:35 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