LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 01-05-2005, 08:42 PM   #1
wildebs_27
LQ Newbie
 
Registered: Jan 2005
Posts: 9

Rep: Reputation: 0
Exclamation 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 !!!!
 
Old 01-05-2005, 10:04 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Green usually means that there executable. ( IT thinks there scripts ).

Also what is the output when you do "ls -l" ( Without quotes )
 
Old 01-06-2005, 01:58 AM   #3
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
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
 
Old 01-06-2005, 07:48 AM   #4
wildebs_27
LQ Newbie
 
Registered: Jan 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks Shade

After doing your command, they were still green with * but at least the page was working perfectly !

 
Old 01-06-2005, 09:21 PM   #5
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
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
 
Old 01-07-2005, 07:13 AM   #6
wildebs_27
LQ Newbie
 
Registered: Jan 2005
Posts: 9

Original Poster
Rep: Reputation: 0
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 ???
 
Old 01-07-2005, 05:18 PM   #7
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
try chmod -R -x. chmod 755 is rwx owner rx group rx everyone. the -x option removes the exucutable bit
 
Old 01-07-2005, 06:23 PM   #8
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
  


Reply



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
Compacting copied DVD files daihard Linux - Software 2 07-10-2005 08:52 PM
files being copied into root mercy420 Slackware 1 06-18-2005 07:23 AM
Copied some files...result: Kernel Panic Cyber Maid Linux - Software 4 05-01-2005 12:09 PM
No files are copied to disk capodan Slackware 2 05-19-2003 03:54 AM
compile files copied from windows max_linuxquesti Linux - Software 4 12-19-2002 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:01 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
Open Source Consulting | Domain Registration