{"id":400,"date":"2010-12-13T11:20:23","date_gmt":"2010-12-13T14:20:23","guid":{"rendered":"http:\/\/stefano.salvatori.cl\/blog\/?p=400"},"modified":"2010-12-13T11:20:23","modified_gmt":"2010-12-13T14:20:23","slug":"tips-permiso-sudo-a-www-data","status":"publish","type":"post","link":"https:\/\/stefano.salvatori.cl\/blog\/2010\/12\/13\/tips-permiso-sudo-a-www-data\/","title":{"rendered":"Tips: Permiso sudo a www-data"},"content":{"rendered":"<p>Tengo que ejecutar un script bash en php usando la funci\u00c3\u00b3n <a title=\"PHP system()\" href=\"http:\/\/cl.php.net\/system\" target=\"_blank\">system()<\/a>, el script debe mover un archivo a una unidad NAS previamente montada via cifs. Para evitar los problemas de permisos agregu\u00c3\u00a9 al usuario www-data en la lista de sudo y santo remedio.<\/p>\n<p><code><\/p>\n<p>sudo visudo<\/p>\n<p><\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n# User privilege specification<br \/>\nroot\tALL=(ALL) ALL<br \/>\nwww-data \u00c2\u00a0ALL=(ALL) NOPASSWD: ALL<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tengo que ejecutar un script bash en php usando la funci\u00c3\u00b3n system(), el script debe mover un archivo a una unidad NAS previamente montada via cifs. Para evitar los problemas de permisos agregu\u00c3\u00a9 al usuario www-data en la lista de sudo y santo remedio. sudo visudo # User privilege specification root ALL=(ALL) ALL www-data \u00c2\u00a0ALL=(ALL) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[36,15,26,49],"tags":[233,174],"class_list":["post-400","post","type-post","status-publish","format-standard","hentry","category-cakephp","category-php","category-tips","category-ubuntu","tag-apache","tag-sudo"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p5Pxa3-6s","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/posts\/400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/comments?post=400"}],"version-history":[{"count":5,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/posts\/400\/revisions"}],"predecessor-version":[{"id":405,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/posts\/400\/revisions\/405"}],"wp:attachment":[{"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/media?parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/categories?post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/tags?post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}