• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Bash question...

Scarpozzi

Lifer
I'm using ssh to administer a search engine running on Linux. When I'm working in the bash, I notice the text is different colors. What do the colors mean, in general. I'm usuing SLES9... Blue text are folders, green text are files, but I have 2 files that I copied into the structure that are showing up as white text.

The reason I'm asking is I can open them in vi, but they are web templates and the server isn't able to find them for some reason. I'm wondering if there's a rights issue or what....the colors probably have something to do with it.
 
The webserver logs should tell you why they can't be found by the webserver. Chances are it's permissions. I'm guessing the colors are handled by tty.
 
Originally posted by: n0cmonkey
The webserver logs should tell you why they can't be found by the webserver. Chances are it's permissions. I'm guessing the colors are handled by tty.
I figured I'd have to go digging for logs....Tomcat is the webserver.... It actually complains that the file doesn't exist...? So I'll have to check the file when I get back from lunch...I'm just new to file rights. I come from a world where rights are inherited by folder level. 😛
 
If it's not permissions (i.e. user tomcat runs as doesn't even have rights to open the files) then it may be other permissions. If you are calling these as scripts you may need to add the execute bit to the scripts, (chmod +x filename)
 
The colors depend a little bit on the distro AFAIK, but for a starting point on Debian here directories are blue, executable files are green, symlinks are light blue, setuid executables are white with a red background, setgid files are black with a yellow background, sticky directories are black with a green background, compressed files are red and media files (videos, pics, etc) are purple-ish.

I figured I'd have to go digging for logs....Tomcat is the webserver.... It actually complains that the file doesn't exist...?

Get used to reading logs, on unix they actually mean something and usually have useful information in them. In your case it probably means that the web server doesn't have permission to one of the parent directories of the file.
 
Originally posted by: Nothinman
The colors depend a little bit on the distro AFAIK, but for a starting point on Debian here directories are blue, executable files are green, symlinks are light blue, setuid executables are white with a red background, setgid files are black with a yellow background, sticky directories are black with a green background, compressed files are red and media files (videos, pics, etc) are purple-ish.

I figured I'd have to go digging for logs....Tomcat is the webserver.... It actually complains that the file doesn't exist...?

Get used to reading logs, on unix they actually mean something and usually have useful information in them. In your case it probably means that the web server doesn't have permission to one of the parent directories of the file.
In this case, the templates are html files. The file is located in a Templates directory and tomcat has rights to view every other file in that directory. I copied these html files from another server, but expected rights to be inherited from the directory structure. I was able to open them in vi, but I had root access. I'm not sure what tomcat uses for security since it was a product of an install wizard....I had little to do with the actual configuration of it. Heck, it took me a while just to figure out what path it was installed in.

 
but expected rights to be inherited from the directory structure.

That doesn't happen on unix, all new files are created with their own set of permissions depending on the application and your umask.

I was able to open them in vi, but I had root access. I'm not sure what tomcat uses for security since it was a product of an install wizard...

You need to figure out what user Tomcat runs as, the permissions on the other files in that directory should be a good place to start.
 
Back
Top