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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-05-2005, 08:42 PM
|
#1
|
LQ Newbie
Registered: Jan 2005
Posts: 9
Rep:
|
Problem accessing files copied from CD to HD
Hi, I'm very new to Linux and I'm having difficulties accessing some files from apache. Let me clarify.
A friend brought me his CD so I could check his modification to his web page. So I removed my files from my test site and copied his from his CD to the default html home directory. To my estonishment, the front page ( index.html ) was accessible but very screwed. So I want to the html directory to discover that all the files were "bright green" and had a STAR ( * ) at the end ex.: index.html * what a hell is that ??? I want to the CD directory in /mnt/cdrom and found all files in the similar situation. I want to see my files that I removed my test site and they were all fine, I mean in their original regular colors.
How can I solve this problem ??? What does the green color mean and what does the * means ??? How can I make those files become " normal " ???
This is the command I used to copy the files from the CD to my HD :
cdrom_> cp -R * /www/html
What did I do wrong ??? I used the -R for recursive because he has directories as well that I needed to copy.
HELP !!!! URGENT !!!!
|
|
|
01-05-2005, 10:04 PM
|
#2
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
Green usually means that there executable. ( IT thinks there scripts ).
Also what is the output when you do "ls -l" ( Without quotes )
|
|
|
01-06-2005, 01:58 AM
|
#3
|
Senior Member
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Rep:
|
The green color and * mean that those files are marked as executable. It's a fault in the translation between fat32/ntfs and whatever unix filesystem you're using -- windows file systems don't use those properties, so when you copy them, they all get set with it enabled by default.
To fix:
chmod -R 755 * from within the server's root... aka
/var/www/htdocs
--Shade
|
|
|
01-06-2005, 07:48 AM
|
#4
|
LQ Newbie
Registered: Jan 2005
Posts: 9
Original Poster
Rep:
|
Thanks Shade
After doing your command, they were still green with * but at least the page was working perfectly !

|
|
|
01-06-2005, 09:21 PM
|
#5
|
Senior Member
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Rep:
|
That's because they were still marked executable to the owner (probably root, and probably what you were running as...) but to the apache user, or nobody user which the server was running under, they were not.
(7 - owner 5 - group 5- all others)
--Shade
|
|
|
01-07-2005, 07:13 AM
|
#6
|
LQ Newbie
Registered: Jan 2005
Posts: 9
Original Poster
Rep:
|
I was running as root when I was copying the files.
Just for curiosities sake, would there have been another way of cp the files so they couldn't be green with *, I guess not since on the CD they were like that. Because it falses the statistics, I mean by that, that html files aren't programs, nor php files nor png files.... is it possible to change the file type ??? 
|
|
|
01-07-2005, 05:18 PM
|
#7
|
Member
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669
Rep:
|
try chmod -R -x. chmod 755 is rwx owner rx group rx everyone. the -x option removes the exucutable bit
|
|
|
01-07-2005, 06:23 PM
|
#8
|
LQ Guru
Registered: Jan 2002
Posts: 6,042
Rep: 
|
Linux has no relationship of filetypes. Linux is using the DIRCOLORS file to translate the file extension to a desire color. A lot programs in Linux guesses the format of the file and tries to open it. Usually they work quite well, but sometimes it may need a hint by looking after the period of the file name. Also Linux works with permissions that the filesystems for CD, DVD, FAT, FAT32, NTFS/HPFS does not support. Linux will usually default it to either 755 or 777 when it mounts those filesystems. The permissions that you can set for either a file or directory can be either a read, a write, and an execute characteristic. Linux does not stop there. Like someone saids Linux a three sets that it can give permission to. The first digit is user. The second digit is group. Third digit is other (everybody).
You should not be as root when copying files from a CD or DVD because you do not need to.
You can do "find directory_name -type d -exec chmod -v 755 {} \;" for the directories and "find directory_name -type f -exec chmod -v 666 {} \;" for the files. You can not do the above on a CD because it is read-only. Do the above after you have copy it to the hard drive.
|
|
|
All times are GMT -5. The time now is 12:37 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|