List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:June 21 2002 1:34pm
Subject:Re: file permissions
View as plain text  
The manual says:

chown -R  mysql.mysql   /usr/local/mysql

You did not do that.

Do the same for  MySQL's data directory.

Michael Sellers wrote:

>I'm very new to mysql. Just learning. I'm trying to correctly set up the
>permissions for the files under the mysql/ directory.  I've included a
>list. I would appreciate it if some one could look over it and recommend
>changes. Thank you.
>
>Michael Sellers
>------------------------------------------------------------------------
>
>/usr/local/mysql
>################
>total 4752
>drwxr-xr-x    2 root     root         4096 Jun 19 00:05 bin
>-rw-r--r--    1 root     mysqlgrp   122213 Jun  3 05:39 ChangeLog
>-rwxr-xr-x    1 root     mysqlgrp      773 Jun  9 08:13 configure
>-rw-r--r--    1 root     mysqlgrp    19106 Jun  8 09:57 COPYING
>-rw-r--r--    1 root     mysqlgrp    47577 Jun  8 09:57 COPYING.LIB
>drwxr-x---    4 root     mysqlgrp     4096 Jun 19 23:02 data
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  9 08:13 include
>-rw-r--r--    1 root     mysqlgrp   147458 Jun  8 09:57 INSTALL-BINARY
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  9 08:13 lib
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  9 08:13 man
>-rw-r--r--    1 root     mysqlgrp  2336774 Jun  8 09:56 manual.html
>-rw-r--r--    1 root     mysqlgrp    85892 Jun  8 09:56 manual_toc.html
>-rw-r--r--    1 root     mysqlgrp  2021070 Jun  8 09:56 manual.txt
>drwxr-xr-x    6 root     mysqlgrp     4096 Jun  9 08:13 mysql-test
>-rw-r--r--    1 root     mysqlgrp     1976 Jun  3 05:39 README
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  9 08:13 scripts
>drwxr-xr-x    3 root     mysqlgrp     4096 Jun  9 08:13 share
>drwxr-xr-x    7 root     mysqlgrp     4096 Jun  9 08:13 sql-bench
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  9 08:13 support-files
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  9 08:13 tests
>
>
>/usr/local/mysql/bin
>################
>total 15696
>-rwxr-xr-x    1 root     root       619808 Jun  9 08:13 comp_err
>-rwxr-xr-x    1 root     root       749524 Jun  9 08:13 isamchk
>-rwxr-xr-x    1 root     root         1474 Jun  9 08:13 msql2mysql
>-rwxr-xr-x    1 root     root       828488 Jun  9 08:13 myisamchk
>-rwxr-xr-x    1 root     root       747244 Jun  9 08:13 myisampack
>-rwxr-xr-x    1 root     root       630504 Jun  9 08:13
>my_print_defaults
>-rwxr-xr-x    1 root     root       759028 Jun  9 08:13 mysql
>-rwxr-xr-x    1 root     root       111547 Jun  9 08:13 mysqlaccess
>-rwxr-xr-x    1 root     root         1702 Jun  3 05:39 mysqlaccess.conf
>-rwxr-xr-x    1 root     root       601236 Jun  9 08:13 mysqladmin
>-rwxr-xr-x    1 root     root       615144 Jun  9 08:13 mysqlbinlog
>-rwxr-xr-x    1 root     root         9731 Jun  9 08:13 mysqlbug
>-rwxr-xr-x    1 root     root       595304 Jun  9 08:13 mysqlcheck
>-rwxr-xr-x    1 root     root         3144 Jun  9 08:13 mysql_config
>-rwxr-xr-x    1 root     root         2976 Jun  9 08:13
>mysql_convert_table_format
>-rwxr-xr-x    1 root     root      3835316 Jun  9 08:13 mysqld
>-rwxr-xr-x    1 root     root        18415 Jun  9 08:13 mysqld_multi
>-rwxr-xr-x    1 root     root        96797 Jun  9 08:13 mysqld.sym.gz
>-rwxr-xr-x    1 root     root       609244 Jun  9 08:13 mysqldump
>-rwxr-xr-x    1 root     root         4986 Jun  9 08:13 mysqldumpslow
>-rwxr-xr-x    1 root     root         2654 Jun  9 08:13 mysql_find_rows
>-rwxr-xr-x    1 root     root         4437 Jun  9 08:13
>mysql_fix_privilege_tables
>-rwxr-xr-x    1 root     root        27610 Jun  9 08:13 mysqlhotcopy
>-rwxr-xr-x    1 root     root       591904 Jun  9 08:13 mysqlimport
>-rwxr-xr-x    1 root     root        15255 Jun  9 08:13
>mysql_setpermission
>-rwxr-xr-x    1 root     root       592800 Jun  9 08:13 mysqlshow
>-rwxr-xr-x    1 root     root       614688 Jun  9 08:13 mysqltest
>-rwxr-xr-x    1 root     root         3104 Jun  9 08:13 mysql_zap
>-rwxr-xr-x    1 root     root       707928 Jun  9 08:13 pack_isam
>-rwxr-xr-x    1 root     root       625528 Jun  9 08:13 perror
>-rwxr-xr-x    1 root     root       633800 Jun  9 08:13 replace
>-rwxr-xr-x    1 root     root       625204 Jun  9 08:13 resolveip
>-rwxr-xr-x    1 root     root       624232 Jun  9 08:13
>resolve_stack_dump
>-rwxr-xr-x    1 root     root         8463 Jun 19 00:03 safe_mysqld
>
>
>/usr/local/mysql/data
>################
>total 44
>-rw-r--r--    1 mysqladm mysqlgrp     3527 Jun 20 19:22 laptop.err
>-rw-rw----    1 root     mysqlgrp    29777 Jun 20 19:22 log.0000000001
>drwxr-x---    2 root     mysqlgrp     4096 Jun 17 11:51 mysql
>drwxr-x---    2 root     mysqlgrp     4096 Jun 17 14:08 test
>
>
>/usr/local/mysql/include
>################
>total 400
>-rw-r--r--    1 root     mysqlgrp    21021 Jun  9 08:07 config.h
>-rw-r--r--    1 root     mysqlgrp     9394 Jun  3 05:39 config-win.h
>-rw-r--r--    1 root     mysqlgrp     3445 Jun  3 05:39 dbug.h
>-rw-r--r--    1 root     mysqlgrp     2082 Jun  3 05:39 errmsg.h
>-rw-r--r--    1 root     mysqlgrp     1819 Jun  3 05:39 ft_global.h
>-rw-r--r--    1 root     mysqlgrp     4799 Jun  3 05:39 getopt.h
>-rw-r--r--    1 root     mysqlgrp    31380 Jun  3 05:39 global.h
>-rw-r--r--    1 root     mysqlgrp     2364 Jun  3 05:39 hash.h
>-rw-r--r--    1 root     mysqlgrp     5599 Jun  3 05:39 heap.h
>-rw-r--r--    1 root     mysqlgrp     5864 Jun  3 05:39 m_ctype.h
>-rw-r--r--    1 root     mysqlgrp     3195 Jun  3 05:39 merge.h
>-rw-r--r--    1 root     mysqlgrp     7594 Jun  3 05:39 m_string.h
>-rw-r--r--    1 root     mysqlgrp     2098 Jun  3 05:39 my_alarm.h
>-rw-r--r--    1 root     mysqlgrp    10725 Jun  3 05:39 my_base.h
>-rw-r--r--    1 root     mysqlgrp     1876 Jun  3 05:39 my_bitmap.h
>-rw-r--r--    1 root     mysqlgrp    21021 Jun  9 08:07 my_config.h
>-rw-r--r--    1 root     mysqlgrp     3294 Jun  3 05:39 my_dir.h
>-rw-r--r--    1 root     mysqlgrp    31380 Jun  3 05:40 my_global.h
>-rw-r--r--    1 root     mysqlgrp    14025 Jun  3 05:39 myisam.h
>-rw-r--r--    1 root     mysqlgrp     3445 Jun  3 05:39 myisammrg.h
>-rw-r--r--    1 root     mysqlgrp     9292 Jun  3 05:39 myisampack.h
>-rw-r--r--    1 root     mysqlgrp     1579 Jun  3 05:39 my_list.h
>-rw-r--r--    1 root     mysqlgrp     2696 Jun  3 05:39 my_net.h
>-rw-r--r--    1 root     mysqlgrp     1206 Jun  3 05:39 my_no_pthread.h
>-rw-r--r--    1 root     mysqlgrp     1712 Jun  3 05:39 my_nosys.h
>-rw-r--r--    1 root     mysqlgrp    21550 Jun  3 05:39 my_pthread.h
>-rw-r--r--    1 root     mysqlgrp     8556 Jun  3 05:39 mysql_com.h
>-rw-r--r--    1 root     mysqlgrp     8188 Jun  3 05:39 mysqld_error.h
>-rw-r--r--    1 root     mysqlgrp    10787 Jun  3 05:39 mysql.h
>-rw-r--r--    1 root     mysqlgrp      552 Jun  9 08:07 mysql_version.h
>-rw-r--r--    1 root     mysqlgrp     1866 Jun  3 05:39 mysys_err.h
>-rw-r--r--    1 root     mysqlgrp    25577 Jun  3 05:39 my_sys.h
>-rw-r--r--    1 root     mysqlgrp     2479 Jun  3 05:39 my_tree.h
>-rw-r--r--    1 root     mysqlgrp     6868 Jun  3 05:39 nisam.h
>-rw-r--r--    1 root     mysqlgrp     2140 Jun  3 05:39 queues.h
>-rw-r--r--    1 root     mysqlgrp     5869 Jun  3 05:39 raid.h
>-rw-r--r--    1 root     mysqlgrp     1605 Jun  3 05:39 sslopt-case.h
>-rw-r--r--    1 root     mysqlgrp     1296 Jun  3 05:39
>sslopt-longopts.h
>-rw-r--r--    1 root     mysqlgrp     1235 Jun  3 05:39 sslopt-usage.h
>-rw-r--r--    1 root     mysqlgrp     1013 Jun  3 05:39 sslopt-vars.h
>-rw-r--r--    1 root     mysqlgrp     4907 Jun  3 05:39 t_ctype.h
>-rw-r--r--    1 root     mysqlgrp     2782 Jun  3 05:39 thr_alarm.h
>-rw-r--r--    1 root     mysqlgrp     3907 Jun  3 05:39 thr_lock.h
>-rw-r--r--    1 root     mysqlgrp     3024 Jun  3 05:39 violite.h
>
>
>/usr/local/mysql/lib
>################
>total 1756
>-rw-r--r--    1 root     mysqlgrp    10774 Jun  9 08:10 libdbug.a
>-rw-r--r--    1 root     mysqlgrp   879270 Oct 24  2001 libmygcc.a
>-rw-r--r--    1 root     mysqlgrp   275060 Jun  9 08:08 libmysqlclient.a
>-rw-r--r--    1 root     mysqlgrp   280630 Jun  9
>08:08libmysqlclient_r.a
>-rw-r--r--    1 root     mysqlgrp   120380 Jun  9 08:10 libmystrings.a
>-rw-r--r--    1 root     mysqlgrp   199264 Jun  9 08:10 libmysys.a
>
>
>/usr/local/mysql/man
>################
>total 68
>-rwxr-xr--    1 root     mysqlgrp     3875 Jun  3 05:39 isamchk.1
>-rw-r--r--    1 root     mysqlgrp     1627 Jun  3 05:39 isamlog.1
>-rw-r--r--    1 root     mysqlgrp     3440 Jun  3 05:39 mysql.1
>-rwxr-xr--    1 root     mysqlgrp     2796 Jun  3 05:39 mysqlaccess.1
>-rwxr-xr--    1 root     mysqlgrp     4462 Jun  3 05:39 mysqladmin.1
>-rwxr-xr--    1 root     mysqlgrp    10894 Jun  3 05:39 mysqld.1
>-rw-r--r--    1 root     mysqlgrp     2481 Jun  3 05:39 mysqld_multi.1
>-rwxr-xr--    1 root     mysqlgrp     7636 Jun  3 05:39 mysqldump.1
>-rwxr-xr--    1 root     mysqlgrp     2317 Jun  3 05:39 mysqlshow.1
>-rw-r--r--    1 root     mysqlgrp     1071 Jun  3 05:39 mysql_zap.1
>-rwxr-xr--    1 root     mysqlgrp     1395 Jun  3 05:39 perror.1
>-rw-r--r--    1 root     mysqlgrp     1535 Jun  3 05:39 replace.1
>-rwxr-xr--    1 root     mysqlgrp     2290 Jun  3 05:39 safe_mysqld.1
>
>
>/usr/local/mysql/mysql-test
>################
>total 52
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  9 08:13 include
>-rwxr-xr-x    1 root     mysqlgrp     7325 Jun  9 08:13 install_test_db
>-rwxr-xr-x    1 root     mysqlgrp    24132 Jun  9 08:13 mysql-test-run
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  9 08:13 r
>-rw-r--r--    1 root     mysqlgrp     2078 Jun  3 05:39 README
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  9 08:13 std_data
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  9 08:13 t
>
>
>/usr/local/mysql/scripts
>################
>total 16
>-rwxr-xr-x    1 root     mysqlgrp    12868 Jun  9 08:13 mysql_install_db
>
>
>/usr/local/mysql/share
>################
>total 4
>drwxr-xr-x   25 root     mysqlgrp     4096 Jun  9 08:13 mysql
>
>
>/usr/local/mysql/sql-bench
>################
>total 476
>-rwxr-xr-x    1 root     mysqlgrp    14695 Jun  9 08:13 bench-init.pl
>-rw-r--r--    1 root     mysqlgrp      665 Jun  3 05:39 ChangeLog
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  3 05:45 Comments
>-rwxr-xr-x    1 root     mysqlgrp    16223 Jun  9 08:13 compare-results
>-rwxr-xr-x    1 root     mysqlgrp     9829 Jun  9 08:13 copy-db
>-rwxr-xr-x    1 root     mysqlgrp   107877 Jun  9 08:13 crash-me
>drwxr-xr-x    4 root     mysqlgrp     4096 Jun  3 05:45 Data
>-rwxr-xr-x    1 root     mysqlgrp    22113 Jun  9 08:13
>graph-compare-results
>drwxr-xr-x    2 root     mysqlgrp     4096 Jun  3 05:45 limits
>-rwxr-xr-x    1 root     mysqlgrp     4320 Jun  3 05:39 README
>drwxr-xr-x    2 root     mysqlgrp    12288 Jun  3 05:45 Results
>drwxr-xr-x    2 root     mysqlgrp     8192 Jun  3 05:45 Results-win32
>-rwxr-xr-x    1 root     mysqlgrp     6897 Jun  9 08:13 run-all-tests
>-rwxr-xr-x    1 root     mysqlgrp    97484 Jun  9 08:13 server-cfg
>-rwxr-xr-x    1 root     mysqlgrp     4989 Jun  9 08:13 test-alter-table
>-rwxr-xr-x    1 root     mysqlgrp    24887 Jun  9 08:13 test-ATIS
>-rwxr-xr-x    1 root     mysqlgrp     4138 Jun  9 08:13 test-big-tables
>-rwxr-xr-x    1 root     mysqlgrp     8618 Jun  9 08:13 test-connect
>-rwxr-xr-x    1 root     mysqlgrp     7047 Jun  9 08:13 test-create
>-rwxr-xr-x    1 root     mysqlgrp    47912 Jun  9 08:13 test-insert
>-rwxr-xr-x    1 root     mysqlgrp    13588 Jun  9 08:13 test-select
>-rwxr-xr-x    1 root     mysqlgrp    11836 Jun  9 08:13 test-wisconsin
>-rw-r--r--    1 root     mysqlgrp      818 Jun  3 05:39 TODO
>
>
>/usr/local/mysql/support-files
>################
>total 68
>-rw-r--r--    1 root     mysqlgrp      773 Jun  3 05:39 magic
>-rw-r--r--    1 root     mysqlgrp     2534 Jun  9 08:13 my-huge.cnf
>-rw-r--r--    1 root     mysqlgrp     2512 Jun  9 08:13 my-large.cnf
>-rw-r--r--    1 root     mysqlgrp     2496 Jun  9 08:13 my-medium.cnf
>-rw-r--r--    1 root     mysqlgrp     2211 Jun  9 08:13 my-small.cnf
>-rwxr-xr-x    1 root     mysqlgrp    16415 Jun  9 08:13
>mysql-3.23.51.spec
>-rwxr-xr-x    1 root     mysqlgrp      675 Jun  9 08:13 mysql-log-rotate
>-rw-r--r--    1 root     mysqlgrp     4023 Jun  9 08:13 mysql.server
>-rw-r--r--    1 root     mysqlgrp    16415 Jun  9 08:13 mysql.spec
>
>
>/usr/local/mysql/tests
>################
>total 164
>-rw-r--r--    1 root     mysqlgrp     2380 Jun  3 05:39
>auto_increment.res
>-rw-r--r--    1 root     mysqlgrp     1123 Jun  3 05:39
>auto_increment.tst
>-rwxr-xr-x    1 root     mysqlgrp     1443 Jun  3 05:39 big_record.pl
>-rwxr-xr-x    1 root     mysqlgrp     6322 Jun  3 05:39 export.pl
>-rwxr-xr-x    1 root     mysqlgrp     6929 Jun  3 05:39 fork2_test.pl
>-rwxr-xr-x    1 root     mysqlgrp    14371 Jun  3 05:39 fork_big.pl
>-rw-r--r--    1 root     mysqlgrp     9083 Jun  3 05:39 function.res
>-rw-r--r--    1 root     mysqlgrp     4037 Jun  3 05:39 function.tst
>-rw-r--r--    1 root     mysqlgrp    20129 Jun  3 05:39 grant.pl
>-rw-r--r--    1 root     mysqlgrp    22061 Jun  3 05:39 grant.res
>-rwxr-xr-x    1 root     mysqlgrp     5149 Jun  3 05:39
>insert_and_repair.pl
>-rwxr-xr-x    1 root     mysqlgrp     3407 Jun  3 05:39 lock_test.pl
>-rw-r--r--    1 root     mysqlgrp      495 Jun  3 05:39 lock_test.res
>-rwxr-xr-x    1 root     mysqlgrp    14325 Jun  3 05:39 mail_to_db.pl
>-rwxr-xr-x    1 root     mysqlgrp     3996 Jun  3 05:39 pmail.pl
>-rwxr-xr-x    1 root     mysqlgrp     5716 Jun  3 05:39 table_types.pl
>-rwxr-xr-x    1 root     mysqlgrp    10319 Jun  3 05:39
>test_delayed_insert.pl
>-rw-r--r--    1 root     mysqlgrp     2370 Jun  3 05:39 udf_test.res
>
>
>
>
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <mysql-thread112646@stripped>
>To unsubscribe, e-mail <mysql-unsubscribe-##L=##H@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


Thread
file permissionsMichael Sellers21 Jun
  • Re: file permissionsGerald Clark21 Jun