IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Shell et commandes GNU Discussion :

[PHP 7] [debian 9] Problème de lancement exec et de montage


Sujet :

Shell et commandes GNU

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    391
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 391
    Points : 124
    Points
    124
    Par défaut [PHP 7] [debian 9] Problème de lancement exec et de montage
    Bonjour,
    discussion sans réponse dans langage php mais je pense que c'est ici sa place : https://www.developpez.net/forums/d1.../#post11012263

    Problème script php qui contient simplement un mount en sudo (droits all bien sûr)
    on lance php go.php

    quelqu'un qui connait les appels système :
    fonctionne en debian 8 et php 5.5
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    L106529
    passe dans gosuite.sh ....
    Machine : L106529 -  IP: xxx.xxx.250.185
    Commande passee :  /bin/mount -t cifs //xxx.xxx.250.185/c$ /mnt/pc-backup/L106529 -o "vers=2.0,username=agent-backup-ws,password=BcK312Eth2,ro,iocharset=utf8,noserverino"
    execve("/bin/mount", ["/bin/mount", "-t", "cifs", "//xxx.xxx.250.185/c$", "/mnt/pc-backup/L106529", "-o", "vers=2.0,username=agent-backup-w"...], [/* 16 vars */]) = 0
    brk(0)                                  = 0x1473000
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2ff6376000
    access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=24858, ...}) = 0
    mmap(NULL, 24858, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2ff636f000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libmount.so.1", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\254\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=284096, ...}) = 0
    mmap(NULL, 2383648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2ff5f12000
    mprotect(0x7f2ff5f55000, 2097152, PROT_NONE) = 0
    mmap(0x7f2ff6155000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x43000) = 0x7f2ff6155000
    mmap(0x7f2ff6157000, 3872, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2ff6157000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20c\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=142728, ...}) = 0
    mmap(NULL, 2246896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2ff5ced000
    mprotect(0x7f2ff5d0e000, 2097152, PROT_NONE) = 0
    mmap(0x7f2ff5f0e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f2ff5f0e000
    mmap(0x7f2ff5f10000, 6384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2ff5f10000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\2\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=1738176, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2ff636e000
    mmap(NULL, 3844640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2ff5942000
    mprotect(0x7f2ff5ae3000, 2097152, PROT_NONE) = 0
    mmap(0x7f2ff5ce3000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0x7f2ff5ce3000
    mmap(0x7f2ff5ce9000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2ff5ce9000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\210\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=258688, ...}) = 0
    mmap(NULL, 2358248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2ff5702000
    mprotect(0x7f2ff573d000, 2097152, PROT_NONE) = 0
    mmap(0x7f2ff593d000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3b000) = 0x7f2ff593d000
    mmap(0x7f2ff5941000, 3048, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2ff5941000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\27\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=448440, ...}) = 0
    mmap(NULL, 2543976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2ff5494000
    mprotect(0x7f2ff5500000, 2097152, PROT_NONE) = 0
    mmap(0x7f2ff5700000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6c000) = 0x7f2ff5700000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=14664, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2ff636d000
    mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2ff5290000
    mprotect(0x7f2ff5293000, 2093056, PROT_NONE) = 0
    mmap(0x7f2ff5492000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f2ff5492000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \26\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=18904, ...}) = 0
    mmap(NULL, 2113952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2ff508b000
    mprotect(0x7f2ff508f000, 2093056, PROT_NONE) = 0
    mmap(0x7f2ff528e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f2ff528e000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320n\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=137384, ...}) = 0
    mmap(NULL, 2213008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2ff4e6e000
    mprotect(0x7f2ff4e86000, 2093056, PROT_NONE) = 0
    mmap(0x7f2ff5085000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f2ff5085000
    mmap(0x7f2ff5087000, 13456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2ff5087000
    close(3)                                = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2ff636c000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2ff636b000
    mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2ff6369000
    arch_prctl(ARCH_SET_FS, 0x7f2ff6369840) = 0
    mprotect(0x7f2ff5ce3000, 16384, PROT_READ) = 0
    mprotect(0x7f2ff5085000, 4096, PROT_READ) = 0
    mprotect(0x7f2ff528e000, 4096, PROT_READ) = 0
    mprotect(0x7f2ff5492000, 4096, PROT_READ) = 0
    mprotect(0x7f2ff5700000, 4096, PROT_READ) = 0
    mprotect(0x7f2ff593d000, 12288, PROT_READ) = 0
    mprotect(0x7f2ff5f0e000, 4096, PROT_READ) = 0
    mprotect(0x7f2ff6155000, 4096, PROT_READ) = 0
    mprotect(0x608000, 4096, PROT_READ)     = 0
    mprotect(0x7f2ff6378000, 4096, PROT_READ) = 0
    munmap(0x7f2ff636f000, 24858)           = 0
    set_tid_address(0x7f2ff6369b10)         = 26703
    set_robust_list(0x7f2ff6369b20, 24)     = 0
    rt_sigaction(SIGRTMIN, {0x7f2ff4e749b0, [], SA_RESTORER|SA_SIGINFO, 0x7f2ff4e7d890}, NULL, 8) = 0
    rt_sigaction(SIGRT_1, {0x7f2ff4e74a40, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f2ff4e7d890}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
    getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
    statfs("/sys/fs/selinux", 0x7fffc958eb60) = -1 ENOENT (No such file or directory)
    statfs("/selinux", 0x7fffc958eb60)      = -1 ENOENT (No such file or directory)
    brk(0)                                  = 0x1473000
    brk(0x1494000)                          = 0x1494000
    open("/proc/filesystems", O_RDONLY)     = 3
    fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2ff6375000
    read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tr"..., 1024) = 278
    read(3, "", 1024)                       = 0
    close(3)                                = 0
    munmap(0x7f2ff6375000, 4096)            = 0
    getuid()                                = 0
    geteuid()                               = 0
    lstat("/mnt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat("/mnt/pc-backup", {st_mode=S_IFDIR|0755, st_size=36864, ...}) = 0
    lstat("/mnt/pc-backup/L106529", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    stat("/sbin/mount.cifs", {st_mode=S_IFREG|S_ISUID|0755, st_size=39600, ...}) = 0
    getuid()                                = 0
    geteuid()                               = 0
    getgid()                                = 0
    getegid()                               = 0
    prctl(PR_GET_DUMPABLE)                  = 1
    getuid()                                = 0
    geteuid()                               = 0
    getgid()                                = 0
    getegid()                               = 0
    prctl(PR_GET_DUMPABLE)                  = 1
    stat("/run", {st_mode=S_IFDIR|0755, st_size=640, ...}) = 0
    lstat("/etc/mtab", {st_mode=S_IFLNK|0777, st_size=12, ...}) = 0
    lstat("/run/mount/utab", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    open("/run/mount/utab", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = 3
    close(3)                                = 0
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f2ff6369b10) = 26704
    Process 26704 attached
    [pid 26703] wait4(-1,  
    [pid 26704] set_robust_list(0x7f2ff6369b20, 24) = 0
    [pid 26704] getgid()                    = 0
    [pid 26704] setgid(0)                   = 0
    [pid 26704] getuid()                    = 0
    [pid 26704] setuid(0)                   = 0
    [pid 26704] execve("/sbin/mount.cifs", ["/sbin/mount.cifs", "//xxx.xxx.250.185/c$", "/mnt/pc-backup/L106529", "-o", "ro,vers=2.0,username=agent-backu"...], [/* 12 vars */]) = 0
    [pid 26704] brk(0)                      = 0x55b5a3c4d000
    [pid 26704] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
    [pid 26704] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f133bb1b000
    [pid 26704] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
    [pid 26704] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
    [pid 26704] fstat(3, {st_mode=S_IFREG|0644, st_size=24858, ...}) = 0
    [pid 26704] mmap(NULL, 24858, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f133bb14000
    [pid 26704] close(3)                    = 0
    [pid 26704] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
    [pid 26704] open("/usr/lib/x86_64-linux-gnu/libcap-ng.so.0", O_RDONLY|O_CLOEXEC) = 3
    [pid 26704] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\25\0\0\0\0\0\0"..., 832) = 832
    [pid 26704] fstat(3, {st_mode=S_IFREG|0644, st_size=22312, ...}) = 0
    [pid 26704] mmap(NULL, 2117648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f133b6f7000
    [pid 26704] mprotect(0x7f133b6fb000, 2097152, PROT_NONE) = 0
    [pid 26704] mmap(0x7f133b8fb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7f133b8fb000
    [pid 26704] close(3)                    = 0
    [pid 26704] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
    [pid 26704] open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
    [pid 26704] read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\2\0\0\0\0\0"..., 832) = 832
    [pid 26704] fstat(3, {st_mode=S_IFREG|0755, st_size=1738176, ...}) = 0
    [pid 26704] mmap(NULL, 3844640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f133b34c000
    [pid 26704] mprotect(0x7f133b4ed000, 2097152, PROT_NONE) = 0
    [pid 26704] mmap(0x7f133b6ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0x7f133b6ed000
    [pid 26704] mmap(0x7f133b6f3000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f133b6f3000
    [pid 26704] close(3)                    = 0
    [pid 26704] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f133bb13000
    [pid 26704] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f133bb11000
    [pid 26704] arch_prctl(ARCH_SET_FS, 0x7f133bb11740) = 0
    [pid 26704] mprotect(0x7f133b6ed000, 16384, PROT_READ) = 0
    [pid 26704] mprotect(0x7f133b8fb000, 4096, PROT_READ) = 0
    [pid 26704] mprotect(0x55b5a287e000, 4096, PROT_READ) = 0
    [pid 26704] mprotect(0x7f133bb1d000, 4096, PROT_READ) = 0
    [pid 26704] munmap(0x7f133bb14000, 24858) = 0
    [pid 26704] geteuid()                   = 0
    [pid 26704] getpid()                    = 26704
    [pid 26704] capget({0 /* _LINUX_CAPABILITY_VERSION_??? */, 0}, NULL) = 0
    [pid 26704] gettid()                    = 26704
    [pid 26704] open("/proc/sys/kernel/cap_last_cap", O_RDONLY) = 3
    [pid 26704] read(3, "37\n", 7)          = 3
    [pid 26704] brk(0)                      = 0x55b5a3c4d000
    [pid 26704] brk(0x55b5a3c6e000)         = 0x55b5a3c6e000
    [pid 26704] capget({_LINUX_CAPABILITY_VERSION_3, 26704}, {CAP_CHOWN|CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH|CAP_FOWNER|CAP_FSETID|CAP_KILL|CAP_SETGID|CAP_SETUID|CAP_SETPCAP|CAP_LINUX_IMMUTABLE|CAP_NET_BIND_SERVICE|CAP_NET_BROADCAST|CAP_NET_ADMIN|CAP_NET_RAW|CAP_IPC_LOCK|CAP_IPC_OWNER|CAP_SYS_MODULE|CAP_SYS_RAWIO|CAP_SYS_CHROOT|CAP_SYS_PTRACE|CAP_SYS_PACCT|CAP_SYS_ADMIN|CAP_SYS_BOOT|CAP_SYS_NICE|CAP_SYS_RESOURCE|CAP_SYS_TIME|CAP_SYS_TTY_CONFIG|CAP_MKNOD|CAP_LEASE|CAP_AUDIT_WRITE|CAP_AUDIT_CONTROL|CAP_SETFCAP, CAP_CHOWN|CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH|CAP_FOWNER|CAP_FSETID|CAP_KILL|CAP_SETGID|CAP_SETUID|CAP_SETPCAP|CAP_LINUX_IMMUTABLE|CAP_NET_BIND_SERVICE|CAP_NET_BROADCAST|CAP_NET_ADMIN|CAP_NET_RAW|CAP_IPC_LOCK|CAP_IPC_OWNER|CAP_SYS_MODULE|CAP_SYS_RAWIO|CAP_SYS_CHROOT|CAP_SYS_PTRACE|CAP_SYS_PACCT|CAP_SYS_ADMIN|CAP_SYS_BOOT|CAP_SYS_NICE|CAP_SYS_RESOURCE|CAP_SYS_TIME|CAP_SYS_TTY_CONFIG|CAP_MKNOD|CAP_LEASE|CAP_AUDIT_WRITE|CAP_AUDIT_CONTROL|CAP_SETFCAP, 0}) = 0
    [pid 26704] open("/proc/26704/status", O_RDONLY|O_CLOEXEC) = 4
    [pid 26704] fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
    [pid 26704] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f133bb1a000
    [pid 26704] read(4, "Name:\tmount.cifs\nState:\tR (runni"..., 1024) = 790
    [pid 26704] close(4)                    = 0
    [pid 26704] munmap(0x7f133bb1a000, 4096) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x1, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x2, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x3, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x4, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x5, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x6, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x7, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x8, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x9, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0xa, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0xb, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0xc, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0xd, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0xe, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0xf, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x10, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x11, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x12, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x13, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x14, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x15, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x16, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x17, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x18, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x19, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x1a, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x1b, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x1c, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x1d, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x1e, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x1f, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x20, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x21, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x22, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x23, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x24, 0, 0, 0) = 0
    [pid 26704] prctl(PR_CAPBSET_DROP, 0x25, 0, 0, 0) = 0
    [pid 26704] capset({_LINUX_CAPABILITY_VERSION_3, 26704}, {CAP_SYS_ADMIN, CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH|CAP_SYS_ADMIN, 0}) = 0
    [pid 26704] mmap(NULL, 11264, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0x7f133bb18000
    [pid 26704] getuid()                    = 0
    [pid 26704] capset({_LINUX_CAPABILITY_VERSION_3, 26704}, {CAP_DAC_READ_SEARCH|CAP_SYS_ADMIN, CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH|CAP_SYS_ADMIN, 0}) = 0
    [pid 26704] chdir("/mnt/pc-backup/L106529") = 0
    [pid 26704] getcwd("/mnt/pc-backup/L106529", 4096) = 23
    [pid 26704] capset({_LINUX_CAPABILITY_VERSION_3, 26704}, {CAP_SYS_ADMIN, CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH|CAP_SYS_ADMIN, 0}) = 0
    [pid 26704] clone(Process 26705 attached
    child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f133bb11a10) = 26705
    [pid 26704] wait4(-1,  
    [pid 26705] capget({_LINUX_CAPABILITY_VERSION_3, 26705}, {CAP_SYS_ADMIN, CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH|CAP_SYS_ADMIN, 0}) = 0
    [pid 26705] open("/proc/26705/status", O_RDONLY|O_CLOEXEC) = 4
    [pid 26705] fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
    [pid 26705] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f133bb17000
    [pid 26705] read(4, "Name:\tmount.cifs\nState:\tR (runni"..., 1024) = 789
    [pid 26705] close(4)                    = 0
    [pid 26705] munmap(0x7f133bb17000, 4096) = 0
    [pid 26705] capset({_LINUX_CAPABILITY_VERSION_3, 26705}, {0, CAP_DAC_READ_SEARCH, 0}) = 0
    [pid 26705] getuid()                    = 0
    [pid 26705] getgid()                    = 0
    [pid 26705] getuid()                    = 0
    [pid 26705] getuid()                    = 0
    [pid 26705] getgid()                    = 0
    [pid 26705] getuid()                    = 0
    [pid 26705] socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE) = 4
    [pid 26705] bind(4, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
    [pid 26705] getsockname(4, {sa_family=AF_NETLINK, pid=26705, groups=00000000}, [12]) = 0
    [pid 26705] sendto(4, "\24\0\0\0\26\0\1\3\237\30\23]\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
    [pid 26705] recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"L\0\0\0\24\0\2\0\237\30\23]Qh\0\0\2\10\200\376\1\0\0\0\10\0\1\0\177\0\0\1"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 164
    [pid 26705] recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"H\0\0\0\24\0\2\0\237\30\23]Qh\0\0\n\200\200\376\1\0\0\0\24\0\1\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 144
    [pid 26705] recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\237\30\23]Qh\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
    [pid 26705] socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
    [pid 26705] connect(5, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
    [pid 26705] close(5)                    = 0
    [pid 26705] close(4)                    = 0
    [pid 26705] exit_group(0)               = ?
    [pid 26705] +++ exited with 0 +++
    [pid 26704] <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 26705
    [pid 26704] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=26705, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
    [pid 26704] capset({_LINUX_CAPABILITY_VERSION_3, 26704}, {CAP_DAC_READ_SEARCH|CAP_SYS_ADMIN, CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH|CAP_SYS_ADMIN, 0}) = 0
    [pid 26704] mount("//xxx.xxx.250.185/c$", ".", "cifs", MS_RDONLY, "ip=xxx.xxx.250.185,unc=\\\\xxx.xxx.2"...) = 0
    [pid 26704] capset({_LINUX_CAPABILITY_VERSION_3, 26704}, {CAP_SYS_ADMIN, CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH|CAP_SYS_ADMIN, 0}) = 0
    [pid 26704] lstat("/etc/mtab", {st_mode=S_IFLNK|0777, st_size=12, ...}) = 0
    [pid 26704] munmap(0x7f133bb18000, 11264) = 0
    [pid 26704] exit_group(0)               = ?
    [pid 26704] +++ exited with 0 +++
    <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 26704
    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=26704, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
    close(1)                                = 0
    close(2)                                = 0
    exit_group(0)                           = ?
    +++ exited with 0 +++
    ---------- : Passe dans else
    fonctionne pas en debian 9 et php 7
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    L106529
    passe dans gosuite.sh ....
    Machine : L106529 -  IP: xxx.xxx.250.185
    Commande passee :  /bin/mount -t cifs //xxx.xxx.250.185/c$ /mnt/pc-backup/L106529 -o "vers=2.0,username=agent-backup-ws,password=BcK312Eth2,ro,iocharset=utf8,noserverino"
    execve("/bin/mount", ["/bin/mount", "-t", "cifs", "//xxx.xxx.250.185/c$", "/mnt/pc-backup/L106529", "-o", "vers=2.0,username=agent-backup-w"...], [/* 16 vars */]) = 0
    brk(NULL)                               = 0x5565ff8c5000
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=24487, ...}) = 0
    mmap(NULL, 24487, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe860e54000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libmount.so.1", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\271\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=313096, ...}) = 0
    mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe860e52000
    mmap(NULL, 2413024, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe8609e9000
    mprotect(0x7fe860a33000, 2097152, PROT_NONE) = 0
    mmap(0x7fe860c33000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4a000) = 0x7fe860c33000
    mmap(0x7fe860c35000, 4576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe860c35000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000k\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=155400, ...}) = 0
    mmap(NULL, 2259664, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe8607c1000
    mprotect(0x7fe8607e6000, 2093056, PROT_NONE) = 0
    mmap(0x7fe8609e5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7fe8609e5000
    mmap(0x7fe8609e7000, 6864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe8609e7000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\4\2\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=1689360, ...}) = 0
    mmap(NULL, 3795296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe860422000
    mprotect(0x7fe8605b7000, 2097152, PROT_NONE) = 0
    mmap(0x7fe8607b7000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x195000) = 0x7fe8607b7000
    mmap(0x7fe8607bd000, 14688, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe8607bd000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\217\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=283464, ...}) = 0
    mmap(NULL, 2383392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe8601dc000
    mprotect(0x7fe86021d000, 2093056, PROT_NONE) = 0
    mmap(0x7fe86041c000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x40000) = 0x7fe86041c000
    mmap(0x7fe860421000, 3616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe860421000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340 \0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=31744, ...}) = 0
    mmap(NULL, 2128832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe85ffd4000
    mprotect(0x7fe85ffdb000, 2093056, PROT_NONE) = 0
    mmap(0x7fe8601da000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7fe8601da000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\25\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=468920, ...}) = 0
    mmap(NULL, 2564360, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe85fd61000
    mprotect(0x7fe85fdd3000, 2093056, PROT_NONE) = 0
    mmap(0x7fe85ffd2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x71000) = 0x7fe85ffd2000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\r\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=14640, ...}) = 0
    mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe860e50000
    mmap(NULL, 2109680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe85fb5d000
    mprotect(0x7fe85fb60000, 2093056, PROT_NONE) = 0
    mmap(0x7fe85fd5f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fe85fd5f000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\25\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=19008, ...}) = 0
    mmap(NULL, 2113936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe85f958000
    mprotect(0x7fe85f95c000, 2093056, PROT_NONE) = 0
    mmap(0x7fe85fb5b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fe85fb5b000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
    open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0Pa\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=135440, ...}) = 0
    mmap(NULL, 2212936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe85f73b000
    mprotect(0x7fe85f753000, 2093056, PROT_NONE) = 0
    mmap(0x7fe85f952000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fe85f952000
    mmap(0x7fe85f954000, 13384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe85f954000
    close(3)                                = 0
    mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe860e4e000
    arch_prctl(ARCH_SET_FS, 0x7fe860e4ee40) = 0
    mprotect(0x7fe8607b7000, 16384, PROT_READ) = 0
    mprotect(0x7fe85f952000, 4096, PROT_READ) = 0
    mprotect(0x7fe85fb5b000, 4096, PROT_READ) = 0
    mprotect(0x7fe85fd5f000, 4096, PROT_READ) = 0
    mprotect(0x7fe85ffd2000, 4096, PROT_READ) = 0
    mprotect(0x7fe8601da000, 4096, PROT_READ) = 0
    mprotect(0x7fe86041c000, 16384, PROT_READ) = 0
    mprotect(0x7fe8609e5000, 4096, PROT_READ) = 0
    mprotect(0x7fe860c33000, 4096, PROT_READ) = 0
    mprotect(0x5565febea000, 4096, PROT_READ) = 0
    mprotect(0x7fe860e5a000, 4096, PROT_READ) = 0
    munmap(0x7fe860e54000, 24487)           = 0
    set_tid_address(0x7fe860e4f110)         = 14505
    set_robust_list(0x7fe860e4f120, 24)     = 0
    rt_sigaction(SIGRTMIN, {sa_handler=0x7fe85f740bd0, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7fe85f74c0e0}, NULL, 8) = 0
    rt_sigaction(SIGRT_1, {sa_handler=0x7fe85f740c60, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7fe85f74c0e0}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
    getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
    statfs("/sys/fs/selinux", 0x7ffd06388080) = -1 ENOENT (No such file or directory)
    statfs("/selinux", 0x7ffd06388080)      = -1 ENOENT (No such file or directory)
    brk(NULL)                               = 0x5565ff8c5000
    brk(0x5565ff8e6000)                     = 0x5565ff8e6000
    open("/proc/filesystems", O_RDONLY)     = 3
    fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
    read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tr"..., 1024) = 309
    read(3, "", 1024)                       = 0
    close(3)                                = 0
    access("/etc/selinux/config", F_OK)     = -1 ENOENT (No such file or directory)
    getuid()                                = 0
    geteuid()                               = 0
    lstat("/mnt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat("/mnt/pc-backup", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
    lstat("/mnt/pc-backup/L106529", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    stat("/sbin/mount.cifs", {st_mode=S_IFREG|S_ISUID|0755, st_size=35600, ...}) = 0
    getuid()                                = 0
    geteuid()                               = 0
    getgid()                                = 0
    getegid()                               = 0
    prctl(PR_GET_DUMPABLE)                  = 1
    stat("/run", {st_mode=S_IFDIR|0755, st_size=600, ...}) = 0
    lstat("/run/mount/utab", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    open("/run/mount/utab", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = 3
    close(3)                                = 0
    clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fe860e4f110) = 14506
    strace: Process 14506 attached
    [pid 14505] wait4(-1,  
    [pid 14506] set_robust_list(0x7fe860e4f120, 24) = 0
    [pid 14506] getgid()                    = 0
    [pid 14506] setgid(0)                   = 0
    [pid 14506] getuid()                    = 0
    [pid 14506] setuid(0)                   = 0
    [pid 14506] execve("/sbin/mount.cifs", ["/sbin/mount.cifs", "//xxx.xxx.250.185/c$", "/mnt/pc-backup/L106529", "-o", "ro,vers=2.0,username=agent-backu"...], [/* 12 vars */]) = 0
    [pid 14506] brk(NULL)                   = 0x5618e61f6000
    [pid 14506] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
    [pid 14506] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
    [pid 14506] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
    [pid 14506] fstat(3, {st_mode=S_IFREG|0644, st_size=24487, ...}) = 0
    [pid 14506] mmap(NULL, 24487, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5261ffd000
    [pid 14506] close(3)                    = 0
    [pid 14506] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
    [pid 14506] open("/lib/x86_64-linux-gnu/libcap-ng.so.0", O_RDONLY|O_CLOEXEC) = 3
    [pid 14506] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\25\0\0\0\0\0\0"..., 832) = 832
    [pid 14506] fstat(3, {st_mode=S_IFREG|0644, st_size=22944, ...}) = 0
    [pid 14506] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5261ffb000
    [pid 14506] mmap(NULL, 2118008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5261bda000
    [pid 14506] mprotect(0x7f5261bde000, 2097152, PROT_NONE) = 0
    [pid 14506] mmap(0x7f5261dde000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7f5261dde000
    [pid 14506] close(3)                    = 0
    [pid 14506] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
    [pid 14506] open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
    [pid 14506] read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\4\2\0\0\0\0\0"..., 832) = 832
    [pid 14506] fstat(3, {st_mode=S_IFREG|0755, st_size=1689360, ...}) = 0
    [pid 14506] mmap(NULL, 3795296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f526183b000
    [pid 14506] mprotect(0x7f52619d0000, 2097152, PROT_NONE) = 0
    [pid 14506] mmap(0x7f5261bd0000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x195000) = 0x7f5261bd0000
    [pid 14506] mmap(0x7f5261bd6000, 14688, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5261bd6000
    [pid 14506] close(3)                    = 0
    [pid 14506] mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5261ff8000
    [pid 14506] arch_prctl(ARCH_SET_FS, 0x7f5261ff8740) = 0
    [pid 14506] mprotect(0x7f5261bd0000, 16384, PROT_READ) = 0
    [pid 14506] mprotect(0x7f5261dde000, 4096, PROT_READ) = 0
    [pid 14506] mprotect(0x5618e5de2000, 4096, PROT_READ) = 0
    [pid 14506] mprotect(0x7f5262003000, 4096, PROT_READ) = 0
    [pid 14506] munmap(0x7f5261ffd000, 24487) = 0
    [pid 14506] geteuid()                   = 0
    [pid 14506] getpid()                    = 14506
    [pid 14506] capget({version=0 /* _LINUX_CAPABILITY_VERSION_??? */, pid=0}, NULL) = 0
    [pid 14506] gettid()                    = 14506
    [pid 14506] open("/proc/sys/kernel/cap_last_cap", O_RDONLY) = 3
    [pid 14506] read(3, "37\n", 7)          = 3
    [pid 14506] close(3)                    = 0
    [pid 14506] brk(NULL)                   = 0x5618e61f6000
    [pid 14506] brk(0x5618e6217000)         = 0x5618e6217000
    [pid 14506] capget({version=_LINUX_CAPABILITY_VERSION_3, pid=14506}, {effective=1<
    [pid 14507] getpid()                    = 14507
    [pid 14507] capget({version=_LINUX_CAPABILITY_VERSION_3, pid=14507}, {effective=1< [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 14507
    [pid 14506] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14507, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
    [pid 14506] capset({version=_LINUX_CAPABILITY_VERSION_3, pid=14506}, {effective=1< [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 14506
    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14506, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
    close(1)                                = 0
    close(2)                                = 0
    exit_group(0)                           = ?
    +++ exited with 0 +++
    ---------- : Passe dans else
    Le problème c'est ceci bien sûr à mon sens ? Avez-vous une idée ?
    capget({version=_LINUX_CAPABILITY_VERSION_3, pid=14507}, {effective=1< [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 14507
    [pid 14506] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14507, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---

  2. #2
    Responsable Systèmes


    Homme Profil pro
    Gestion de parcs informatique
    Inscrit en
    Août 2011
    Messages
    17 452
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Gestion de parcs informatique
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Août 2011
    Messages : 17 452
    Points : 43 103
    Points
    43 103
    Par défaut
    Je pense à un problème sécurité. Y a t'il quelque chose comme apparmor sur le poste ?

    Essayes avec la commande system plutôt qu'exec pour voir si ça change quelque chose.

    Mais tu ferais mieux de passer par cron hors php.
    Ma page sur developpez.com : http://chrtophe.developpez.com/ (avec mes articles)
    Mon article sur le P2V, mon article sur le cloud
    Consultez nos FAQ : Windows, Linux, Virtualisation

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    391
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 391
    Points : 124
    Points
    124
    Par défaut
    Bonjour,
    Je pense à un problème sécurité. Y a t'il quelque chose comme apparmor sur le poste ?
    non

    Essayes avec la commande system plutôt qu'exec pour voir si ça change quelque chose.
    idem

    Mais tu ferais mieux de passer par cron hors php.
    non car c'est une application php qui utilise dirvish mais j'ai fait un petit fichier php qui concentre le pb voir post précédent lien sur ...;

    Merci quand même

    Je ne sais pas quoi faire ?

    Personne connait les appels capget ... Qu'est qui différencie Debian 9 et 8 sur ces appels ? Il s'agit simplement de lancer en www-data un sudo mount dans un fichier php !

  4. #4
    Responsable Systèmes


    Homme Profil pro
    Gestion de parcs informatique
    Inscrit en
    Août 2011
    Messages
    17 452
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Gestion de parcs informatique
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Août 2011
    Messages : 17 452
    Points : 43 103
    Points
    43 103
    Par défaut
    Extrait de la doc de la fonction capget :

    Depuis Linux 2.2, la toute puissance du superutilisateur (root) a été scindée en plusieurs ensembles distincts. Chaque thread dispose d'un ensemble de capacités effectives permettant d'identifier ses droits de réaliser certaines actions. Chaque thread a aussi un ensemble de capacités héritables, qu'il peut transmettre au travers d'un execve(2) et un ensemble de capacités éventuelles qu'il peut rendre effectives ou héritables.
    Ces deux fonctions constituent l'interface brute du noyau pour configurer ou lire les capacités d'un processus. Non seulement ces appels système sont spécifiques à Linux, mais l'API du noyau est susceptible de changer. L'utilisation de ces fonctions (en particulier le format du type cap_user_*_t) risque de varier lors de nouvelles mises à jour du noyau.
    Ma page sur developpez.com : http://chrtophe.developpez.com/ (avec mes articles)
    Mon article sur le P2V, mon article sur le cloud
    Consultez nos FAQ : Windows, Linux, Virtualisation

  5. #5
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    391
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 391
    Points : 124
    Points
    124
    Par défaut
    merci quand même mais j'ai plus d'information. Désolé

    mais ça marche sur debian 8 :
    Linux kvm-backup-sgp 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u3 (2017-08-15) x86_64 GNU/Linux

    pas sur Debian 9 :
    Linux kvm-backup-sgp1 4.9.0-8-amd64 #1 SMP Debian 4.9.130-1 (2018-10-10) x86_64 GNU/Linux

  6. #6
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    391
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 391
    Points : 124
    Points
    124
    Par défaut
    Help !!!!!!! works in debian 8 and php 5.5
    > L106529
    passe dans gosuite.sh ....
    Machine : L106529 - IP: xxx.xxx.250.185
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    Commande passee :  /bin/mount -t cifs //xxx.xxx.250.185/c$ /mnt/pc-backup/L106529 -o "vers=2.0,username=agent-backup-ws,password=BcK312Eth2,ro,iocharset=utf8,noserverino"
    execve("/bin/mount", ["/bin/mount", "-t", "cifs", "//xxx.xxx.250.185/c$", "/mnt/pc-backup/L106529", "-o", "vers=2.0,username=agent-backup-w"...], [/* 16 vars */]) = 0
    [
    pid 26704] mount("//xxx.xxx.250.185/c$", ".", "cifs", MS_RDONLY, "ip=xxx.xxx.250.185,unc=\\\\xxx.xxx.2"...) = 0
    [pid 26704] capset({_LINUX_CAPABILITY_VERSION_3, 26704}, {CAP_SYS_ADMIN, CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH|CAP_SYS_ADMIN, 0}) = 0
    not works in debian 9 php 7 :

    L106529
    passe dans gosuite.sh ....
    Machine : L106529 - IP: xxx.xxx.250.185
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    Commande passee :  /bin/mount -t cifs //xxx.xxx.250.185/c$ /mnt/pc-backup/L106529 -o "vers=2.0,username=agent-backup-ws,password=BcK312Eth2,ro,iocharset=utf8,noserverino"
    execve("/bin/mount", ["/bin/mount", "-t", "cifs", "//xxx.xxx.250.185/c$", "/mnt/pc-backup/L106529", "-o", "vers=2.0,username=agent-backup-w"...], [/* 16 vars */]) = 0
    brk(NULL) = 0x5565ff8c5000
    pid 14506] capget({version=0 /* _LINUX_CAPABILITY_VERSION_??? */, pid=0}, NULL) = 0
    [pid 14506] gettid() = 14506
    [pid 14506] open("/proc/sys/kernel/cap_last_cap", O_RDONLY) = 3
    [pid 14506] read(3, "37\n", 7) = 3
    [pid 14506] close(3) = 0
    Une idée ?

    Il s'agit ici de montrer le cas bloquant, mais en fait c'est une application de type dirvish qui plante de la même manière via l'appel php

    J'ai essayé : sudo capsh --print voir les capabilities getpcaps 1234 (numéro de process) mais ça ne n'avance pas plus !

  7. #7
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 552
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 552
    Points : 19 392
    Points
    19 392
    Par défaut
    tu peux essayer sur une autre distribution non basée sur Debian ?
    pour voir si le problème vient de la distro ou du passage d'une version de PHP à une autre.
    .
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

  8. #8
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    391
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 391
    Points : 124
    Points
    124
    Par défaut
    Bonjour,
    je n'ai pas pu tester sur un autre système ou sur une autre version php !

    j'aimerais savoir comment vous faites pour monter une ressource (il faut que je le fasse de cette façon !) via une page php ?

    Merci
    J'ai essayé :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    #$output=exec('sudo  /var/www/html/gosuite.sh 2>&1');
    #$output=shell_exec('sudo  /var/www/html/gosuite.sh 2>&1');
    #$output=system('sudo  /var/www/html/gosuite.sh 2>&1');
    #$output=passthru('sudo  /var/www/html/gosuite.sh 2>&1');
    #$output=proc_open('sudo  /var/www/html/gosuite.sh 2>&1');
    avec gosuite.sh
    Commande passee : /bin/mount -t cifs //xxx.xxx.250.185/c$ /mnt/pc-backup/L106529 -o "vers=2.0,username=agent-backup-ws,password=BcK312Eth2,ro,iocharset=utf8,noserverino"
    execve("/bin/mount", ["/bin/mount", "-t", "cifs", "//xxx.xxx.250.185/c$", "/mnt/pc-backup/L106529", "-o", "vers=2.0,username=agent-backup-w"...], [/* 16 vars */]) = 0
    J'ai ceci aussi :
    ccess("/etc/selinux/config", F_OK) = -1 ENOENT (No such file or directory)
    J'ai regardé :
    getenforce commande qui n'existe pas
    /etc/selinux/config n'existe pas

    En voyant les différences sur les deux log début de la discussion on voir des problème de capabilities :
    J'ai
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Voir :getcap /bin/mount
    setcap cap_net_raw=pe  /bin/mount (ici ajoute effective et permit)
    getcap /bin/mount donne
    /bin/mount = cap_net_raw+ep
    J'ai relancé le go.php ---> idem pas de montage via la commande mount !!!

    Si un spécialise linux peut m'aider ?
    Merci

Discussions similaires

  1. Réponses: 7
    Dernier message: 16/04/2010, 21h24
  2. problème de module php sur debian
    Par princesse95 dans le forum Administration système
    Réponses: 3
    Dernier message: 20/10/2009, 11h35
  3. Probléme du lancement du serveur apache PHP
    Par fofina dans le forum Apache
    Réponses: 2
    Dernier message: 10/06/2008, 11h22
  4. Problème d'ouverture de fichier php sur Debian etch
    Par fayred dans le forum Applications et environnements graphiques
    Réponses: 0
    Dernier message: 27/09/2007, 14h24
  5. [Install] Problème de lancement sous debian sid
    Par SoaR245 dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 18/02/2004, 10h01

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo