How to access /var/www/html folder from ubuntu user through SFTPFiles copied to folder in var/www disappears...
Will rerolling initiative each round stop meta-gaming about initiative?
Article. The word "Respect"
How can the probability of a fumble decrease linearly with more dice?
How to not let the Identify spell spoil everything?
If angels and devils are the same species, why would their mortal offspring appear physically different?
"Starve to death" Vs. "Starve to the point of death"
Renting a 2CV in France
Why did Luke use his left hand to shoot?
A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?
Is there a way to not have to poll the UART of an AVR?
How to politely refuse in-office gym instructor for steroids and protein
Website seeing my Facebook data?
Why do neural networks need so many training examples to perform?
Does the US government have any planning in place to ensure there's no shortages of food, fuel, steel and other commodities?
Why didn't the 2019 Oscars have a host?
Has any human ever had the choice to leave Earth permanently?
Not a Long-Winded Riddle
Why is that max-Q doesn't occur in transonic regime?
The No-Straight Maze
Plausible reason to leave the Solar System?
Can you determine if focus is sharp without diopter adjustment if your sight is imperfect?
How do you get out of your own psychology to write characters?
Critique vs nitpicking
How do you funnel food off a cutting board?
How to access /var/www/html folder from ubuntu user through SFTP
Files copied to folder in var/www disappears on restartPermission denied while writing a file in var/www in spite of adding me to user groupBest way to configure apache2 access rightsI want to create an FTP account that can oversee multiple other FTP accounts. How should I manage my permissions and users?User has full access with FTP, limited access with SFTPhow to add a user directory in apache on ubuntuHow to add files to /var/www/html/ without using the terminal?Files/folders as group-owner www-data and SFTP as a different userApache permissions to allow both user and web server to edit /var/www/var/www/ Security
I messed up with some permission level on /var/www/
and /var/www/html/
folders by running some random commands through putty.
Initially I want to add or edit some files in /var/www/html/
and I executed some commands which give me the permission to add or edit files through SFTP. But it causes a problem and I was unable to update or create any files through webserver apache
.
After then I executed some random commands which gives apache
to view and edit files under /var/www/html/
but I m not not able to view files from SFTP.
I have attached some screenshot of folder permission
My Configurtion
OS: Ubuntu 18.04
Provider: AWS
FTP Username: ubuntu
I logged in to SFTP through PPK files
Now I want to gain access through SFTP to /var/www/html/
server permissions ssh apache2 sftp
New contributor
add a comment |
I messed up with some permission level on /var/www/
and /var/www/html/
folders by running some random commands through putty.
Initially I want to add or edit some files in /var/www/html/
and I executed some commands which give me the permission to add or edit files through SFTP. But it causes a problem and I was unable to update or create any files through webserver apache
.
After then I executed some random commands which gives apache
to view and edit files under /var/www/html/
but I m not not able to view files from SFTP.
I have attached some screenshot of folder permission
My Configurtion
OS: Ubuntu 18.04
Provider: AWS
FTP Username: ubuntu
I logged in to SFTP through PPK files
Now I want to gain access through SFTP to /var/www/html/
server permissions ssh apache2 sftp
New contributor
add a comment |
I messed up with some permission level on /var/www/
and /var/www/html/
folders by running some random commands through putty.
Initially I want to add or edit some files in /var/www/html/
and I executed some commands which give me the permission to add or edit files through SFTP. But it causes a problem and I was unable to update or create any files through webserver apache
.
After then I executed some random commands which gives apache
to view and edit files under /var/www/html/
but I m not not able to view files from SFTP.
I have attached some screenshot of folder permission
My Configurtion
OS: Ubuntu 18.04
Provider: AWS
FTP Username: ubuntu
I logged in to SFTP through PPK files
Now I want to gain access through SFTP to /var/www/html/
server permissions ssh apache2 sftp
New contributor
I messed up with some permission level on /var/www/
and /var/www/html/
folders by running some random commands through putty.
Initially I want to add or edit some files in /var/www/html/
and I executed some commands which give me the permission to add or edit files through SFTP. But it causes a problem and I was unable to update or create any files through webserver apache
.
After then I executed some random commands which gives apache
to view and edit files under /var/www/html/
but I m not not able to view files from SFTP.
I have attached some screenshot of folder permission
My Configurtion
OS: Ubuntu 18.04
Provider: AWS
FTP Username: ubuntu
I logged in to SFTP through PPK files
Now I want to gain access through SFTP to /var/www/html/
server permissions ssh apache2 sftp
server permissions ssh apache2 sftp
New contributor
New contributor
New contributor
asked yesterday
PlanetHackersPlanetHackers
1062
1062
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You need to log in as a user with sudo permission, or as root. If the user does not have root permission, they have to respect the folder owner
And since the owner is apache, of course certain non sudo users can't access it
I am able to logged in as root through putty by commandsudo su -
. But I logged into FTP account throughubuntu
user
– PlanetHackers
yesterday
@PlanetHackers the user must be sudo, or the root user
– colbycdev
yesterday
I know thatsudo su -
do the same
– PlanetHackers
10 hours ago
add a comment |
I manage with similar case in that way:
groupadd web
groupmems -g web -a myuser
chown -R .web /var/www/html/
chmod -R g+w /var/www/html/
mkdir ~myuser/web
mount --bind /var/www/html/ ~myuser/web
Explanation: create group for myuser (and others) and mount point in his mode directory. Then mount --bind
apache dir.
You have to add mount
to the start script.
Now you will have access to apache dir from your home.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
PlanetHackers is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1120863%2fhow-to-access-var-www-html-folder-from-ubuntu-user-through-sftp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to log in as a user with sudo permission, or as root. If the user does not have root permission, they have to respect the folder owner
And since the owner is apache, of course certain non sudo users can't access it
I am able to logged in as root through putty by commandsudo su -
. But I logged into FTP account throughubuntu
user
– PlanetHackers
yesterday
@PlanetHackers the user must be sudo, or the root user
– colbycdev
yesterday
I know thatsudo su -
do the same
– PlanetHackers
10 hours ago
add a comment |
You need to log in as a user with sudo permission, or as root. If the user does not have root permission, they have to respect the folder owner
And since the owner is apache, of course certain non sudo users can't access it
I am able to logged in as root through putty by commandsudo su -
. But I logged into FTP account throughubuntu
user
– PlanetHackers
yesterday
@PlanetHackers the user must be sudo, or the root user
– colbycdev
yesterday
I know thatsudo su -
do the same
– PlanetHackers
10 hours ago
add a comment |
You need to log in as a user with sudo permission, or as root. If the user does not have root permission, they have to respect the folder owner
And since the owner is apache, of course certain non sudo users can't access it
You need to log in as a user with sudo permission, or as root. If the user does not have root permission, they have to respect the folder owner
And since the owner is apache, of course certain non sudo users can't access it
answered yesterday
colbycdevcolbycdev
12910
12910
I am able to logged in as root through putty by commandsudo su -
. But I logged into FTP account throughubuntu
user
– PlanetHackers
yesterday
@PlanetHackers the user must be sudo, or the root user
– colbycdev
yesterday
I know thatsudo su -
do the same
– PlanetHackers
10 hours ago
add a comment |
I am able to logged in as root through putty by commandsudo su -
. But I logged into FTP account throughubuntu
user
– PlanetHackers
yesterday
@PlanetHackers the user must be sudo, or the root user
– colbycdev
yesterday
I know thatsudo su -
do the same
– PlanetHackers
10 hours ago
I am able to logged in as root through putty by command
sudo su -
. But I logged into FTP account through ubuntu
user– PlanetHackers
yesterday
I am able to logged in as root through putty by command
sudo su -
. But I logged into FTP account through ubuntu
user– PlanetHackers
yesterday
@PlanetHackers the user must be sudo, or the root user
– colbycdev
yesterday
@PlanetHackers the user must be sudo, or the root user
– colbycdev
yesterday
I know that
sudo su -
do the same– PlanetHackers
10 hours ago
I know that
sudo su -
do the same– PlanetHackers
10 hours ago
add a comment |
I manage with similar case in that way:
groupadd web
groupmems -g web -a myuser
chown -R .web /var/www/html/
chmod -R g+w /var/www/html/
mkdir ~myuser/web
mount --bind /var/www/html/ ~myuser/web
Explanation: create group for myuser (and others) and mount point in his mode directory. Then mount --bind
apache dir.
You have to add mount
to the start script.
Now you will have access to apache dir from your home.
add a comment |
I manage with similar case in that way:
groupadd web
groupmems -g web -a myuser
chown -R .web /var/www/html/
chmod -R g+w /var/www/html/
mkdir ~myuser/web
mount --bind /var/www/html/ ~myuser/web
Explanation: create group for myuser (and others) and mount point in his mode directory. Then mount --bind
apache dir.
You have to add mount
to the start script.
Now you will have access to apache dir from your home.
add a comment |
I manage with similar case in that way:
groupadd web
groupmems -g web -a myuser
chown -R .web /var/www/html/
chmod -R g+w /var/www/html/
mkdir ~myuser/web
mount --bind /var/www/html/ ~myuser/web
Explanation: create group for myuser (and others) and mount point in his mode directory. Then mount --bind
apache dir.
You have to add mount
to the start script.
Now you will have access to apache dir from your home.
I manage with similar case in that way:
groupadd web
groupmems -g web -a myuser
chown -R .web /var/www/html/
chmod -R g+w /var/www/html/
mkdir ~myuser/web
mount --bind /var/www/html/ ~myuser/web
Explanation: create group for myuser (and others) and mount point in his mode directory. Then mount --bind
apache dir.
You have to add mount
to the start script.
Now you will have access to apache dir from your home.
answered 6 hours ago
Piotr GogolinPiotr Gogolin
111
111
add a comment |
add a comment |
PlanetHackers is a new contributor. Be nice, and check out our Code of Conduct.
PlanetHackers is a new contributor. Be nice, and check out our Code of Conduct.
PlanetHackers is a new contributor. Be nice, and check out our Code of Conduct.
PlanetHackers is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1120863%2fhow-to-access-var-www-html-folder-from-ubuntu-user-through-sftp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown