Keresés

Új hozzászólás Aktív témák

  • HDR123

    tag

    Van egy rapsberry pi-m ami eddig ip kamera módban futott az rpicam appal.

    Mióta beüzemeltem az OMV-t és a SAMBA is ezen van, azóta nem tudok képet készíteni a pi-vel. Pontosan annak a webes felületével, mivel fájl szinten elérem a SAMBA-t és tudok is rá írni.
    Megnéztem a pi-n, először az fstab szerint beállított és mount mappába készíti a fájlt, majd utána a fájlba beleírná a tartalmat (képet), de az a user már nem az amit én beállítottam az fstab-al, hanem a www-data. Neki pedig nincs joga ott piszkálni fájlokat az OMV rendszeren.

    A kérdés: kezdjek vlamit a www-dta userrel OMV oldalon vagy a pi oldalon próbáljam meg lecserélni az Apache usert www-data-ról valami másra? Kinek van hasonló tapasztalat? Raspian és Debian OS-eket használok.

  • HDR123

    tag

    válasz cigam #9175 üzenetére

    Raspberry pi oldalán fstab, ezen az eszközön fut még ez a web app [link]

    proc /proc proc defaults 0 0
    PARTUUID=730f89b2-01 /boot vfat defaults 0 2
    PARTUUID=730f89b2-02 / ext4 defaults,noatime 0 1
    //192.168.1.104/Share /mnt/samba cifs defaults,rw,username=raspberry,password=***,noauto,x-systemd.automount 0 0
    //192.168.1.104/FTP /mnt/ftp cifs username=raspberry,password=***,noauto,x-systemd.automount 0 0
    # a swapfile is not a swap partition, no line here
    # use dphys-swapfile swap[on|off] for that

    OMV oldalán amin található a SAMBA szerver, a mappa tulajdonságai a következőek:

    root@omvserver:/srv/dev-disk-by-id-ata-ST1000LM035-1RK172_WBZ1E0CB-part1/Share# ls -la
    total 44
    drwxrwsr-x+ 6 root users 4096 Jun 24 11:36 .
    drwxrwxrwx 7 root root 4096 Jun 19 00:44 ..
    drwxrwsr-x+ 8 root users 4096 Aug 10 00:48 Downloads
    drwxrwsr-x+ 4 root users 4096 Jun 22 21:09 Phone
    drwxrwsr-x+ 2 www-data users 4096 Aug 10 01:05 RPiCam
    drwxrwxr-x+ 25 root users 4096 Aug 3 17:50 Zene

    Ezt az OMV felületről is szoktam bizgetni, itt látszik hogy kik férnek hozza (a képen nem látszik a www-data user és group és max jogosultságokkal kezeli a könyvtárat):

    Ha az RPiCam könyvtárnak az ownere a www-data, akkor létrejön a fájl, aminek az ownere raspberry, de nem íródik bele semmi. Bármilyen más ownere lesz a könyvtárnak akkor nem jön látre a fájl.
    Ha a fájl ownerét módosítom rapberry-ről www-data-ra, akkor a raspberry ki tudja törölni a fájlt az RPiCam mappából.

  • HDR123

    tag

    válasz cigam #9177 üzenetére

    Átállítottam az ownert, de nem változott. Újrabootoltam, mountoltam, de semmi.
    Ezt kapom az getfacl parancsra:
    # file: RPiCam/
    # owner: raspberry
    # group: Users
    # flags: -s-
    user::rwx
    user:www-data:rwx
    user:marci:rwx
    user:raspberry:rwx
    group::rwx
    group:www-data:rwx
    group:Users:rwx
    mask::rwx
    other::r-x
    default:user::rwx
    default:user:www-data:rwx
    default:user:marci:rwx
    default:user:raspberry:rwx
    default:group::rwx
    default:group:www-data:rwx
    default:group:Users:rwx
    default:mask::rwx
    default:other::r-x

  • HDR123

    tag

    válasz cigam #9182 üzenetére

    A [Share]-en belül van az RPiCam folder.
    A teljes smb fájl:
    #======================= Global Settings =======================
    [global]
    workgroup = WORKGROUP
    server string = omv samba server
    dns proxy = no
    log level = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    logging = syslog
    panic action = /usr/share/samba/panic-action %d
    encrypt passwords = true
    passdb backend = tdbsam
    obey pam restrictions = no
    unix password sync = no
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    pam password change = yes
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    guest account = nobody
    load printers = no
    disable spoolss = yes
    printing = bsd
    printcap name = /dev/null
    unix extensions = yes
    wide links = no
    create mask = 0777
    directory mask = 0777
    use sendfile = yes
    aio read size = 16384
    aio write size = 16384
    local master = yes
    time server = no
    wins support = no
    #======================= Share Definitions =======================
    [PhonePolli]
    path = /srv/dev-disk-by-id-ata-ST1000LM035-1RK172_WBZ1E0CB-part1/Share/Phone/polli
    guest ok = no
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = no
    ea support = no
    store dos attributes = no
    vfs objects =
    printable = no
    create mask = 0664
    force create mode = 0664
    directory mask = 0775
    force directory mode = 0775
    hide special files = yes
    follow symlinks = yes
    hide dot files = yes
    valid users = "phone_polli",@"Users"
    invalid users =
    read list =
    write list = "phone_polli",@"Users"
    [PhoneMarci]
    path = /srv/dev-disk-by-id-ata-ST1000LM035-1RK172_WBZ1E0CB-part1/Share/Phone/marci
    guest ok = no
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = no
    ea support = no
    store dos attributes = no
    vfs objects =
    printable = no
    create mask = 0664
    force create mode = 0664
    directory mask = 0775
    force directory mode = 0775
    hide special files = yes
    follow symlinks = yes
    hide dot files = yes
    valid users = "marci","phone_marci",@"Users"
    invalid users =
    read list =
    write list = "marci","phone_marci",@"Users"
    [FTP]
    path = /srv/dev-disk-by-id-ata-ST1000LM035-1RK172_WBZ1E0CB-part1/FTP
    guest ok = no
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = no
    ea support = no
    store dos attributes = no
    vfs objects =
    printable = no
    create mask = 0664
    force create mode = 0664
    directory mask = 0775
    force directory mode = 0775
    hide special files = yes
    follow symlinks = yes
    hide dot files = yes
    valid users = "marci","raspberry",@"Users"
    invalid users =
    read list =
    write list = "marci","raspberry",@"Users"
    [Share]
    path = /srv/dev-disk-by-id-ata-ST1000LM035-1RK172_WBZ1E0CB-part1/Share
    guest ok = no
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = yes
    ea support = no
    store dos attributes = no
    vfs objects =
    printable = no
    create mask = 0664
    force create mode = 0664
    directory mask = 0775
    force directory mode = 0775
    hide special files = yes
    follow symlinks = yes
    hide dot files = yes
    valid users = "marci","raspberry",@"Users"
    invalid users =
    read list =
    write list = "marci","raspberry",@"Users"

  • HDR123

    tag

    válasz cigam #9184 üzenetére

    igen, sikerült mindent.
    pi userként belptem ssh-n és késítettem egy fájlt, annak a jogosultságai így néznek ki:
    pi@raspberrypi:/mnt/samba/RPiCam $ ls -la
    összesen 4
    drwxrwsr-x+ 2 1001 pi 0 aug 13 12:28 .
    drwxrwsr-x+ 6 root users 0 aug 13 12:27 ..
    -rw-rw-r--+ 1 1001 pi 6 aug 13 12:28 teszt.txt

    és ez pedig a könyvtár jogosultságai:
    pi@raspberrypi:/mnt/samba $ ls -la
    összesen 4
    drwxrwsr-x+ 6 root users 0 aug 13 12:27 .
    drwxr-xr-x 4 root root 4096 jan 17 2019 ..
    drwxrwsr-x+ 7 root users 0 aug 10 01:15 Downloads
    drwxrwsr-x+ 4 root users 0 jún 22 21:09 Phone
    drwxrwsr-x+ 2 1001 pi 0 aug 13 12:28 RPiCam
    drwxrwxr-x+ 25 root users 0 aug 3 17:50 Zene

  • HDR123

    tag

    ezért is gondolom hogy ami a webapp-ban fut az www-data userként működik. Viszont az sys user, így nem tudom felvenni.

Új hozzászólás Aktív témák