Code Search for Developers
 
 
  

chown.sh from SME Web Application Framework at Krugle


Show chown.sh syntax highlighted

#!/bin/bash
### Set the proper ownership and group of several files and
### directories recursivly. Uses '../chown' (see ../chown.c).
###
### '../chown' changes the ownership and group of a single file
### to WWW_DATA_OWNER(MY_UID) and WWW_DATA_GROUP(APACHE_UID),
### but only if the file is owned by me (data owner) or apache.
###
### This script is equivalent to the command:
### bash# chown -R MY_UID:APACHE_UID file_or_dir_1 file_or_dir_2 ...
### but it does not need root permissions and it works only for
### files owned by me or apache.

chown=$(dirname $0)/chown

for arg in "$@"
do
  if [ -f $arg ]
  then
    chmod ug+rw $arg
    $chown $arg
  elif [ -d $arg ]
  then
    chmod -R ug+rw $arg

    dir_list=$(find $arg -type d)
    for dir in $dir_list
    do
      chmod ug+x $dir
      $chown $dir 
    done

    file_list=$(find $arg -type f)
    for file in $file_list
    do
      $chown $file
    done
  fi
done




See more files for this project here

SME Web Application Framework

smewebapp intends to simplify the construction of web applications for informatization of the work of SME-s (small and medium enterprises), institutions, organizations etc.

Project homepage: http://sourceforge.net/projects/smewebapp
Programming language(s): JavaScript,PHP,Shell Script,XML
License: other

  codedoc/
    README.txt
    doxygen.cfg
    generate-code-doc.sh
    index.html
    phpdoc_html.sh
    phpdoc_pdf.sh
  config/
    const.DB.php
    const.Debug.php
    const.Options.php
    const.Paths.php
  css/
    print/
      button.css
      filter.css
      form.css
      hidden_submit.css
      list.css
      print.css
    button.css
    filter.css
    form.css
    hidden_submit.css
    list.css
    main.css
    selection.css
  db/
    backup.sh
    create.sh
    dump.sh
    dump_tables.sh
    init.sh
    menushpk-tables.sql
    menushpk.sql
    restore.sh
  docs/
    UML_Model/
      UML_Model.xmi
      aktivitetet.png
      database_diagram.png
      database_fields.png
      modeli_biznesit.png
    etags/
      etags.sh
      web_app.etags
    external/
      README.txt
      doxygen.cfg
      phpdoc.sh
    uml_model_png/
      database_diagrams/
        magazina.png
        skema_llogjike.png
        tabelat_kryesore.png
        tabelat_ndihmese.png
      logical_design/
        buletinet.png
        buletinet_klasat.png
        koeficientet.png
        magazina.png
        modulet_kryesore.png
        rpt_punet.png
        shpenzimet.png
      usecase_diagrams/
        administratori.png
        financieri.png
        magazinieri.png
        normisti.png
        perdoruesit.png
        pronari.png
        teknologu.png
        user.png
    changes.txt
    conventions.txt
    creating-a-new-app.txt
    doc.txt
    misc-notes.txt
    modules.txt
    tree.sh
    uml_model.xmi
  graphics/
    blue_triangle.png
    header_background.png
    pixel.png
  initial-modules/
    admin/
    documents/
    inventory/
    reports/
    tables/
    README
    config.sh
    create-modules.sh
    init-module.sh
    update-module.sh
    update-modules.sh
  l10n/
    compendia/
    en/
    sq_AL/
    README
    compendium-sq_AL.po
    get_app_name.sh
    menushpk.po
    msgcat.sh
    msgfmt.sh
    msginit.sh
    msgmerge.sh
    xgettext.sh
  module-templates/
    documents/
    edit_form/
    filter_1/
    filter_2/
    input_form/
    items/
    items_1/
    items_2/
    list/
    logs/
    pdf_document/
    simple_input_form/
    summary_report/
    tables/
    users/
    README
  modules/
    admin/
    documents/
    etc/
    filter/
    help/
    inventory/
    language/
    login/
    main/
  tools/
  upload/
  webobjects/
  COPYING
  INSTALL
  ToDo.txt
  browse.php
  chown.c
  chown.sh
  global.php
  index.php
  init.php
  install.sh
  upload-backup.php
  webapp.php