cvsgraph.conf는 별다르게 수정할건 없으며
viewvc.conf는 상당부분 수정이 가해진다.
#---------------------------------------------------------------------------
#
# Configuration file for ViewVC
#
# Information on ViewVC is located at the following web site:
# http://viewvc.org/
#
#---------------------------------------------------------------------------
#
# BASIC CONFIGURATION
#
# For correct operation, you will probably need to change the following
# configuration variables:
#
# cvs_roots (for CVS)
# svn_roots (for Subversion)
# root_parents (for CVS or Subversion)
# default_root
# rcs_path or cvsnt_exe_path
# mime_types_file
#
# It is usually desirable to change the following variables:
#
# address
# forbidden
#
# use_enscript
# use_cvsgraph
#
# For Python source colorization:
#
# py2html_path
#
# To optimize delivery of ViewVC static files:
#
# docroot
#
# To customize the display of ViewVC for your site:
#
# template_dir
# the [templates] override section
#
#
# FORMAT INFORMATION
#
# This file is delineated by sections, specified in [brackets]. Within each
# section, are a number of configuration settings. These settings take the
# form of: name = value. Values may be continued on the following line by
# indenting the continued line.
#
# WARNING: indentation *always* means continuation. name=value lines should
# always start in column zero.
#
# Comments should always start in column zero, and are identified with "#".
#
# Certain configuration settings may have multiple values. These should be
# separated by a comma. The settings where this is allowed are noted below.
#
# Any other setting that requires special syntax is noted at that setting.
#
#
# This setting specifies each of the CVS roots on your system and assigns
# names to them. Each root should be given by a "name: path" value. Multiple
# roots should be separated by commas and can be placed on separate lines.
# cvs_roots = cvs: /home/cvs
#
# This setting specifies each of the Subversion roots (repositories)
# on your system and assigns names to them. Each root should be given
# by a "name: path" value. Multiple roots should be separated by
# commas and can be placed on separate lines.
# svn_roots = svn: /home/svn/repository
# The 'root_parents' setting specifies a list of directories in which
# any number of repositories may reside. Rather than force you to add
# a new entry to 'cvs_roots' or 'svn_roots' each time you create a new
# repository, ViewVC rewards you for organising all your repositories
# under a few parent directories by allowing you to simply specifiy
# just those parent directories. ViewVC will then notice each
# repository in that directory as a new root whose name is the
# subdirectory of the parent path in which that repository lives.
#
# You can specify multiple parent paths separated by commas or new lines.
#
# Caution: these names can, of course, clash with names you have
# defined in your cvs_roots or svn_roots configuration items. If this
# occurs, you can either rename the offending repository on disk, or
# grant new names to the clashing item in cvs_roots or svn_roots.
# Each parent path is processed sequentially, so repositories under
# later parent paths may override earlier ones.
#
#root_parents = /home/svn-repositories : svn,
# /home/cvs-repositories : cvs
# this is the name of the default root
# (ignored when root_as_url_component is turned on)
default_root =
# uncomment if the RCS binaries are not on the standard path
#rcs_path = /usr/bin/
# ViewVC can use CVSNT (www.cvsnt.org) instead of the RCS
# utilities to retrieve information from CVS repositories.
# To enable use of CVSNT, set the "cvsnt_exe_path" value
# to the path of the CVSNT executable. (If CVSNT is on the
# standard path, you can also set it to the name of the
# CVSNT executable). By default "cvsnt_exe_path" is set to
# "cvs" on Windows and is not set on other platforms.
#
#cvsnt_exe_path =
#cvsnt_exe_path = cvs
#cvsnt_exe_path = K:\Program Files\cvsnt\cvs.exe
#cvsnt_exe_path = /usr/bin/cvs
# use rcsparse python module to retrieve cvs repository information instead
# of invoking rcs utilities. this feature is experimental
use_rcsparse = 0
# uncomment if the svn command-line utilities are not on the standard path
#svn_path = /usr/bin/
#
# This is a pathname to a MIME types file to help viewvc to guess the
# correct MIME type on checkout.
#
# If you are having problems with the default guess on the MIME type, then
# uncomment this option and point it at a MIME type file.
#
# For example, you can use the mime.types from apache here:
#mime_types_file = /usr/local/apache/conf/mime.types
# This address is shown in the footer of the generated pages.
# It must be replaced with the address of the local repository maintainer.
address = <a href="mailto:cvs-admin@insert.your.domain.here">No admin address has been configured</a>
#
# This should contain a list of modules (that is, top-level directories within
# repositories) that should not be displayed (by default or by explicit path
# specification).
#
# This configuration can be a simple list of modules, or it can get quite
# complex:
#
# *) The "!" can be used before a module to explicitly state that it
# is NOT forbidden. Whenever this form is seen, then all modules will
# be forbidden unless one of the "!" modules match.
#
# *) Shell-style "glob" expressions may be used. "*" will match any
# sequence of zero or more characters, "?" will match any single
# character, "[seq]" will match any character in seq, and "[!seq]"
# will match any character not in seq.
#
# *) Tests are performed in sequence. The first match will terminate the
# testing. This allows for more complex allow/deny patterns.
#
# Tests are case-sensitive.
#
# NOTE: This is for the hiding of modules within repositories, *not*
# for the hiding of repositories (roots) themselves.
#
# Some examples:
#
# Disallow "example" but allow all others:
# forbidden = example
#
# Disallow "example1" and "example2" but allow all others:
# forbidden = example1, example2
#
# Allow *only* "example1" and "example2":
# forbidden = !example1, !example2
#
# Forbid modules starting with "x":
# forbidden = x*
#
# Allow modules starting with "x" but no others:
# forbidden = !x*
#
# Allow "xml", forbid other modules starting with "x", and allow the rest:
# forbidden = !xml, x*, !*
#
forbidden =
#
# This is similar to 'forbidden', but differs in some key ways:
#
# *) Rather than shell-style "glob" expressions, the values in this
# list are regular expressions. You can still prepend a ! character
# to each regular expression to invert its meaning, though.
#
# *) It compares not against modules only, but against paths consisting
# of the repository (or root) name plus the path of the versioned file
# or directory to be tested. For example, to see if the user is
# authorized to see the path "/trunk/www/index.html" in the repository
# whose root name is "svnrepos", this authorizer will test the path
# "svnrepos/trunk/www/index.html" against the list of forbidden regular
# expressions. Directory paths will be terminated by a forward slash.
#
# NOTE: Use of this configuration option will *disable* any configuration of
# the 'forbidden' option -- they cannot be used simultaneously.
#
# Some examples:
#
# Disallow files named "PRIVATE", but allow all others:
# forbiddenre = /PRIVATE$
#
# Allow only the "example1" and "example2" roots and the paths inside them,
# disallowing all others (which can be done in multiple ways):
# forbiddenre = !^example1(/|$), !^example2(/|$)/
# forbiddenre = !^example[12](/|$)
#
# Only allow visibility of HTML files and the directories that hold them:
# forbiddenre = !^.*(/|\.html)$
#
forbiddenre =
#
# This option provides a mechanism for custom key/value pairs to be
# available to templates. These are stored in key/value files (KV files).
#
# Pathnames to the KV files are listed here, specified as absolute paths
# or relative to this configuration file. The kV files follow the same
# format as this configuration file. It may have multiple, user-defined
# sections, and user-defined options in those sections. These are all
# placed into a structure available to the templates as:
#
# kv.SECTION.OPTION
#
# Note that an option name can be dotted. For example:
#
# [my_images]
# logos.small = /images/small-logo.png
# logos.big = /images/big-logo.png
#
# Templates can use these with a directive like: [kv.my_images.logos.small]
#
# Note that sections across multiple files will be merged. If two files
# have a [my_images] section, then the options will be merged together.
# If two files have the same option name in a section, then one will
# overwrite the other (it is unspecified regarding which "wins").
#
# To further categorize the KV files, and how the values are provided to
# the templates, a KV file name may be annotated with an additional level
# of dotted naming. For example:
#
# kv_files = [asf]kv/images.conf
#
# Assuming the same section as above, the template would refer to an image
# using [kv.asf.my_images.logos.small]
#
# Lastly, it is possible to use %lang% in the filenames to specify a
# substitution of the selected language-tag.
#
kv_files =
#
# The languages available to ViewVC. There are several i18n mechanisms
# available:
#
# 1) using key/value extension system and reading KV files based on
# the selected language
# 2) GNU gettext to substitute text in the templates
# 3) using different templates, based on the selected language
#
# ### NOTE: at the moment, the GNU gettext style is not implemented
#
# This option is a comma-separated list of language-tag values. The first
# language-tag listed is the default language, and will be used if an
# Accept-Language header is not present in the request, or none of the
# user's requested languages are available. If there are ties on the
# selection of a language, then the first to appear in the list is chosen.
#
languages = en-us
# other examples:
#
# languages = en-us, de
# languages = en-us, en-gb, de
# languages = de, fr, en-us
#
# root_as_url_component: Interpret the first path component in the URL
# after the script location as the root to use. This is an
# alternative to using the "root=" query key. If ViewVC is configured
# with multiple repositories, this results in more natural looking
# ViewVC URLs.
# Note: Enabling this option will break backwards compatibility with
# any old ViewCVS URL which doesn't have an explicit "root" parameter.
root_as_url_component = 0
# default_file_view: "log" or "co"
# Controls whether the default view for file URLs is a checkout view or
# a log view. "log" is the default for backwards compatibility with old
# ViewCVS URLs, but "co" has the advantage that it allows ViewVC to serve
# static HTML pages directly from a repository with working links
# to other repository files
# Note: Changing this option may cause old ViewCVS URLs that referred
# to log pages to load checkout pages instead.
default_file_view = log
# checkout_magic: Use checkout links with magic /*checkout*/ prefixes so
# checked out HTML pages can have working links to other repository files
# Note: This option is DEPRECATED and should not be used in new ViewVC
# installations. Setting "default_file_view = co" achieves the same effect
checkout_magic = 0
# http_expiration_time: Expiration time (in seconds) for cacheable
# pages served by ViewVC. Note that in most cases, a cache aware
# client will only revalidate the page after it expires (using the
# If-Modified-Since and/or If-None-Match headers) and that browsers
# will also revalidate the page when the reload button is pressed.
# Set to 0 to disable the transmission of these caching headers.
http_expiration_time = 600
# generate_etags: Generate Etag headers for relevant pages to assist
# in browser caching.
# 1 Generate Etags
# 0 Don't generate Etags
generate_etags = 1
# sort_by: File sort order
# file Sort by filename
# rev Sort by revision number
# date Sort by commit date
# author Sort by author
# log Sort by log message
sort_by = file
# sort_group_dirs: Group directories when sorting
# 1 Group directories together
# 0 No grouping -- sort directories as any other item would be sorted
sort_group_dirs = 1
# hide_attic: Hide or show the contents of the Attic subdirectory
# 1 Hide dead files inside Attic subdir
# 0 Show the files which are inside the Attic subdir
hide_attic = 1
# log_sort: Sort order for log messages
# date Sort revisions by date
# rev Sort revision by revision number
# cvs Don't sort them. Same order as CVS/RCS shows them.
log_sort = date
# diff_format: Default diff format
# h Human readable
# u Unified diff
# c Context diff
# s Side by side
# l Long human readable (more context)
diff_format = h
# hide_cvsroot: Don't show the CVSROOT directory
# 1 Hide CVSROOT directory
# 0 Show CVSROOT directory
hide_cvsroot = 1
# set to 1 to make lines break at spaces,
# set to 0 to make no-break lines,
# set to a positive integer to make the lines cut at that length
hr_breakable = 1
# give out function names in human readable diffs
# this just makes sense if we have C-files, otherwise
# diff's heuristic doesn't work well ..
# ( '-p' option to diff)
hr_funout = 0
# ignore whitespaces for human readable diffs
# (indendation and stuff ..)
# ( '-w' option to diff)
hr_ignore_white = 1
# ignore diffs which are caused by
# keyword-substitution like $Id - Stuff
# ( '-kk' option to rcsdiff)
hr_ignore_keyword_subst = 1
# Enable highlighting of intraline changes in human readable diffs
# this feature is experimental and currently requires python 2.4
#
hr_intraline = 0
# allow on-the-fly generation of repository tarballs
allow_tar = 0
# allow annotation of files.
allow_annotate = 1
# allow pretty-printed version of files
allow_markup = 1
# allow compression with gzip of output if the Browser accepts it
# (HTTP_ACCEPT_ENCODING=gzip)
# [make sure to have gzip in the path]
allow_compress = 1
# The directory which contains the EZT templates used by ViewVC to
# customize the display of the various output views. ViewVC looks in
# this directory for files with names that match the name of the view
# ("log", "directory", etc.) plus the ".ezt" extension. If specified
# as a relative path, it is relative to the ViewVC installation
# directory; absolute paths may be used as well.
#
# If %lang% occurs in the pathname, then the selected language will be
# substituted.
#
template_dir = /etc/viewvc/templates
# Web path to a directory that contains ViewVC static files
# (stylesheets, images, etc.) If set, static files will get
# downloaded directory from this location. If unset, static files
# will be served by the ViewVC script (at a likely performance
# penalty, and from the "docroot" subdirectory of the directory
# specified by the "template_dir" option).
#docroot = /docroot
# Show last changelog message for sub directories
# The current implementation makes many assumptions and may show the
# incorrect file at some times. The main assumption is that the last
# modified file has the newest filedate. But some CVS operations
# touches the file without even when a new version is not checked in,
# and TAG based browsing essentially puts this out of order, unless
# the last checkin was on the same tag as you are viewing.
# Enable this if you like the feature, but don't rely on correct results.
show_subdir_lastmod = 0
# show a portion of the most recent log entry in directory listings
show_logs = 1
# Show log when viewing file contents
show_log_in_markup = 1
# Display dates as UTC or in local time zone
use_localtime = 0 #use_localtime = 1
# == Configuration defaults ==
# Defaults for configuration variables that shouldn't need
# to be configured..
#
# If you want to use Marc-Andrew Lemburg's py2html (and Just van Rossum's
# PyFontify) to colorize Python files, then you may need to change this
# variable to point to their directory location.
#
# This directory AND the standard Python path will be searched.
#
py2html_path = .
#py2html_path = /usr/local/lib/python1.5/site-python
# the length to which the most recent log entry should be truncated when
# shown in the directory view
short_log_len = 80
# should we use 'enscript' for syntax coloring? use_enscript = 1
#
# if the enscript program is not on the path, set this value
#
enscript_path = # enscript_path = /usr/bin/
# should we use 'highlight' for syntax coloring?
# NOTE: use_enscript has to be 0 or enscript will be used instead use_highlight = 0
#
# if the highlight program is not on the path, set this value
#
# highlight_path = /usr/bin
# should we add line numbers?
highlight_line_numbers = 1
# convert tabs to ## spaces (use 0 for no conversion)
highlight_convert_tabs = 2
# use php to colorize .php and .inc files?
use_php = 0
# path to php executable
# (This should be set to the path of a PHP CLI executable, not the path
# to a CGI executable. If you use a CGI executable, you may see "no input file
# specified" or "force-cgi-redirect" errors instead of colorized source. The
# output of "php -v" tells you whether an given executable is CLI or CGI.)
php_exe_path = php # php_exe_path = /usr/local/bin/php
# php_exe_path = C:\Program Files\php\cli\php.exe
#
# Use CvsGraph. See http://www.akhphd.au.dk/~bertho/cvsgraph/ for
# documentation and download.
# use_cvsgraph = 0 # use_cvsgraph = 1
#
# if the cvsgraph program is not on the path, set this value
# #cvsgraph_path = cvsgraph_path = /usr/bin/
#
# Location of the customized cvsgraph configuration file.
# You will need an absolute pathname here:
# cvsgraph_conf = /etc/viewvc/cvsgraph.conf
#
# Set to enable regular expression search of all files in a directory
#
# WARNING:
#
# Enabling this option can consume HUGE amounts of server time. A
# "checkout" must be performed on *each* file in a directory, and
# the result needs to be searched for a match against the regular
# expression.
#
#
# SECURITY WARNING: Denial Of Service
#
# Since a user can enter the regular expression, it is possible for
# them to enter an expression with many alternatives and a lot of
# backtracking. Executing that search over thousands of lines over
# dozens of files can easily tie up a server for a long period of
# time.
#
# This option should only be used on sites with trusted users. It is
# highly inadvisable to use this on a public site.
#
use_re_search = 0 # use_re_search = 1
#
# Split directories and logs into pages.
# Allows ViewVC to present discrete pages to the users instead of the
# entire log or directory.
# Set use_pagesize to the number of entries you want displayed on a page.
#
use_pagesize = 0 # use_pagesize = 20
# Limit number of changed paths shown per commit in the Subversion revision
# view and in query results. This is not a hard limit (the UI provides
# options to show all changed paths), but it prevents ViewVC from generating
# enormous and hard to read pages by default when they happen to contain
# import or merge commits affecting hundreds or thousands of files.
# Set to 0 to disable the limit.
limit_changes = 100
# You can override the templates used by various ViewVC views in this
# section. By default, ViewVC will look for templates in the
# directory specified by the "template_dir" configuration option (see
# the documentation for that option for details). But if you want to
# use a different template for a particular view, simply uncomment the
# appropriate option below and specify the currect location of the EZT
# template file you wish to use for that view.
#
# Templates are specified relative to the installation directory, but
# absolute paths may also be used as well.
#
# If %lang% occurs in the pathname, then the selected language will be
# substituted.
#
# Note: the selected language is defined by the "languages" item in the
# [general] section, and based on the request's Accept-Language
# header.
#
#directory = templates/directory.ezt
### an alternative directory view
#directory = templates/dir_new.ezt
#log = templates/log.ezt
### a table-based alternative log view
#log = templates/log_table.ezt
#query = templates/query.ezt
#diff = templates/diff.ezt
#graph = templates/graph.ezt
#annotate = templates/annotate.ezt
#markup = templates/markup.ezt
#revision = templates/revision.ezt
#query_form = templates/query_form.ezt
#query_results = templates/query_results.ezt
#error = templates/error.ezt
#roots = templates/roots.ezt
# [vhost1-section]
# option = value
# [vhost1-othersection]
# option = value
# [vhost2-section]
# option = value
#
# Here is an example:
#
# [vhosts]
# lyra = *lyra.org
#
# [lyra-general]
# forbidden = hideme
#
# [lyra-options]
# show_logs = 0
#
# Note that "lyra" is the "canonical" name for all hosts in the lyra.org
# domain. This canonical name is then used within the additional, vhost-
# specific sections to override specific values in the common sections.
#
예전글인 이녀석 2008/12/22 - [Linux] - 심볼릭 링크에 대한 미스테리
왜 심볼릭 링크의 크기는 파일크기와 문자열 길이가 동일할까? 라는 의문이 들었는데,
not null-terminated 라고 함은, inode 쪽에서 filename 변수를 가지고,
실제로 filename 변수에는 \0(=NULL)이 없기 때문이 아닐까 싶다.
i-node에는 파일의 속성이 저장되고,
디렉토리 구조체에 파일의 i-node와 파일의 이름이 저장된다.
# vi /usr/include/bits/dirent.h
struct dirent
{
#ifndef __USE_FILE_OFFSET64
__ino_t d_ino;
__off_t d_off;
#else
__ino64_t d_ino;
__off64_t d_off;
#endif
unsigned short int d_reclen;
unsigned char d_type;
char d_name[256]; /* We must not include limits.h! */
};
# vi /usr/include/bits/stat.h
struct stat
{
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
#ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
#else
__ino_t __st_ino; /* 32bit file serial number. */
#endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
#ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
#else
__off64_t st_size; /* Size of file, in bytes. */
#endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
#ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
#else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
#endif
#ifdef __USE_MISC
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
identifier 'timespec' to appear in the header.
Therefore we have to handle the use of this header in strictly
standard-compliant sources special. */
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
# define st_atime st_atim.tv_sec /* Backward compatibility. */
# define st_mtime st_mtim.tv_sec
# define st_ctime st_ctim.tv_sec
#else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
#endif
#ifndef __USE_FILE_OFFSET64
unsigned long int __unused4;
unsigned long int __unused5;
#else
__ino64_t st_ino; /* File serial number. */
#endif
};
다르게 생각해 보자면,
directory table에 파일 이름이 저장되고, (심볼릭 링크)
속성으로 심볼릭 링크가 지정되며,
inode의 filesize는 string이 아닌 data로서 \0(=NULL)이 빠진 순수한 원본 경로만 들어가서
ls 시의 심볼릭 링크 파일의 크기가 예상과 달리 -1 크기로 나오는게 아닐까 싶다.
Return Value
Upon successful completion, readlink() shall return the count of bytes placed in the buffer. Otherwise, it shall return a value of -1, leave the buffer unchanged, and set errno to indicate the error.
The readlink function gets the value of the symbolic link filename. The file name that the link points to is copied into buffer. This file name string is not null-terminated; readlink normally returns the number of characters copied. The size argument specifies the maximum number of characters to copy, usually the allocation size of buffer.
APPLICATION USAGE
Conforming applications should not assume that the returned contents of the symbolic link are null-terminated.
RATIONALE
Since IEEE Std 1003.1-2001 does not require any association of file times with symbolic links, there is no requirement that file times be updated by readlink(). The type associated with bufsiz is a size_t in order to be consistent with both the ISO C standard and the definition of read(). The behavior specified for readlink() when bufsiz is zero represents historical practice. For this case, the standard developers considered a change whereby readlink() would return the number of non-null bytes contained in the symbolic link with the buffer buf remaining unchanged; however, since the stat structure member st_size value can be used to determine the size of buffer necessary to contain the contents of the symbolic link as returned by readlink(), this proposal was rejected, and the historical practice retained.
wget은 머의 약자일려나.. 혹시.. ftp의 get 명령어를 Web에서 한다고 wget 이려나?
아무튼, wget은 Ubuntu 9.10에서 2010-04-10 에 1.11.4 버전을 유지하고있다.
$ wget -V GNU Wget 1.11.4
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Currently maintained by Micah Cowan <micah@cowan.name>.
gnu 에서는 1.12 가 최신인데 짝수버전은 피하는 성격상 11.4를 넣은것으로 생각된다.
-s Spider mode - only check file existence
-c Continue retrieval of aborted transfer
-q Quiet
-P Set directory prefix to DIR
-O Save to filename ('-' for stdout)
-U Adjust 'User-Agent' field
-Y Use proxy ('on' or 'off')
FC6 기준으로
/usr/share/doc/MAKEDEV-3.23/devices-2.6+.txt
파일이 존재하며
커널에서 상당부분 정해진 값으로 고정된 것으로 보인다.
type major,minor crw-r----- 1 root kmem 1, 1 4월 2 20:04 mem crw-rw-rw- 1 root root 1, 3 4월 2 20:04 null crw-r----- 1 root kmem 1, 4 4월 2 20:04 port crw-rw-rw- 1 root root 1, 5 4월 2 20:04 zero crw-rw-rw- 1 root root 1, 7 4월 2 20:04 full crw-rw-rw- 1 root root 1, 8 4월 2 20:04 random cr--r--r-- 1 root root 1, 9 4월 2 20:04 urandom crw------- 1 root root 1, 11 4월 2 20:04 kmsg crw------- 1 root root 1, 12 4월 2 20:04 oldmem
brw-r----- 1 root disk 1, 0 4월 2 20:04 ram0 brw-r----- 1 root disk 1, 1 4월 2 20:04 ram1 brw-r----- 1 root disk 1, 2 4월 2 20:04 ram2 brw-r----- 1 root disk 1, 3 4월 2 20:04 ram3 brw-r----- 1 root disk 1, 4 4월 2 20:04 ram4 brw-r----- 1 root disk 1, 5 4월 2 20:04 ram5 brw-r----- 1 root disk 1, 6 4월 2 20:04 ram6 brw-r----- 1 root disk 1, 7 4월 2 20:04 ram7 brw-r----- 1 root disk 1, 8 4월 2 20:04 ram8 brw-r----- 1 root disk 1, 9 4월 2 20:04 ram9 brw-r----- 1 root disk 1, 10 4월 2 20:04 ram10 brw-r----- 1 root disk 1, 11 4월 2 20:04 ram11 brw-r----- 1 root disk 1, 12 4월 2 20:04 ram12 brw-r----- 1 root disk 1, 13 4월 2 20:04 ram13 brw-r----- 1 root disk 1, 14 4월 2 20:04 ram14 brw-r----- 1 root disk 1, 15 4월 2 20:04 ram15
1 char Memory devices
1 = /dev/mem Physical memory access
2 = /dev/kmem Kernel virtual memory access
3 = /dev/null Null device
4 = /dev/port I/O port access
5 = /dev/zero Null byte source
6 = /dev/core OBSOLETE - replaced by /proc/kcore
7 = /dev/full Returns ENOSPC on write
8 = /dev/random Nondeterministic random number gen.
9 = /dev/urandom Faster, less secure random number gen.
10 = /dev/aio Asyncronous I/O notification interface
11 = /dev/kmsg Writes to this come out as printk's
1 block RAM disk
0 = /dev/ram0 First RAM disk
1 = /dev/ram1 Second RAM disk
...
250 = /dev/initrd Initial RAM disk {2.6}
#include <sys/socket.h> /* for AF_INET */
struct hostent *gethostbyaddr(const void *addr, int len, int type);
# cat /usr/include/netdb.h
/* Description of data base entry for a single host. */ struct hostent
{
char *h_name; /* Official name of host. */
char **h_aliases; /* Alias list. */
int h_addrtype; /* Host address type. */
int h_length; /* Length of address. */
char **h_addr_list; /* List of addresses from name server. */
#define h_addr h_addr_list[0] /* Address, for backward compatibility. */
};
우분투에서 아파치를 설치하면 아래와 같은 기본설정 파일이 생성된다.
htdocs는 /var/www 이고 root:root 권한을 가진다.
drwxr-xr-x 7 root root 4096 2010-04-03 21:18 www
하지만 apache2는 www-data:www-data 권한으로 서버가 실행되고
웹서버는 /var/www에 대하여 other 권한으로 파일을 access 하게된다.
/var/www를 www-data:www-data 로 변경하는게 무난한 방법이 될 듯하다.
# cat /etc/apache2/apache2.conf 144 # These need to be set in /etc/apache2/envvars 145 User ${APACHE_RUN_USER} 146 Group ${APACHE_RUN_GROUP}
# cat /etc/apache2/envvars 1 # envvars - default environment variables for apache2ctl 2 3 # Since there is no sane way to get the parsed apache2 config in scripts, some 4 # settings are defined via environment variables and then used in apache2ctl, 5 # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 6 export APACHE_RUN_USER=www-data 7 export APACHE_RUN_GROUP=www-data