-1

I have apache web server, linux, ssh access with sudo. And many troubles with editing, uploading, pushing, committing there. Because there are set 755 for dirs, 644 for files, and apache:apache owner

Question: how to upload, push with such permissions or with smallest changes of config. May be using extra soft will be helpful.

Current work process; 1. changing rights/owners 2. making file operations 3. changing rights/owners back or 1. making file operations directly via bash with sudo 2. setting correct rights/owners

  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Web Applications Stack Exchange](http://webapps.stackexchange.com/), [Webmaster Stack Exchange](http://webmasters.stackexchange.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww May 18 '18 at 00:05
  • @jww There are a lot of other less programming/development related questions than this one. For example https://stackoverflow.com/questions/8689780/how-to-clear-the-cache-in-netbeans?s=4|68.2384 https://stackoverflow.com/questions/21042861/dark-theme-in-netbeans-7-or-8?s=7|63.8340 – user3456655 May 18 '18 at 18:12
  • @jww but i've got it and from now will post such questions at that places. Okay. – user3456655 May 18 '18 at 18:13

1 Answers1

-1
  • first for upload a in zip or tar, you can use scp, correct syntax scp -r foo your_username@remotehost.edu:/some/remote/directory.

  • later of upload for make permission for a certain user you can use su "username" for unzip or tar, with this you make the files with correct permission to user.

  • the same permission that you have before, apply to new files with this user

  • or use git, with git you can clone your repository o code with the correct permission for files with any user, i recommend use bitbucket for this

jonathan
  • 114
  • 9
  • thank you for answer , server is located at intranet (not internet) your approach is better than editing 1 by 1 file. But there are still a lot of handwork: writing 1 simple script i save/upload file about 20-30 times. ...... i will try it, but still looking for an automated solution – user3456655 May 17 '18 at 18:08